i've been working on a number of stuff for months lately, one of them is a small script, in it i had hoped to call common events, this is the code
class Test
def self.runFunction
@data_commonevent2 = load_data("Data/CommonEvents2.rxdata")
common_event = @data_commonevent2[1]
# If common event is valid
if common_event != nil
p "hello"
# Make child interpreter
@child_interpreter = Interpreter.new(1)
@child_interpreter.setup(common_event.list, 5)
p "hello2"
end
end
end
as you can obviously see, most of it i copied from Interpreter3, how it should work is that when you use the script call Test::runFunction(), it first loads a .rxdata file which is a copy of the CommonEvents.rxdata file, all it contains is 1 common event which has the show message event command, i have CommonEvents.rxdata have nothing for that same common event so i know that it's the common event of CommonEvents2 which is working when this function runs.
after that it just does what Interpreter3 does for common events (i can't remember the command number but i know it's in Interpreter3), anyway, when i run it, i get now error, hello and hello2 print out but the common event doesn't work, am i missing something in this script?