Alright, scripting newb here.
I'm trying to create a simple script which will call a common event if a comment is there, first I got no errors but it didn't work, now it is getting errors and doesn't work at all.
The error is on line 3, and it says "undefined method 'events' for nil:NilClass"
I have no idea what this means, and I can't figure out what to do.
Can somebody help me with this simple script?
Please say it easy enough for a newb to understand. @_@
Thanks.
I'm trying to create a simple script which will call a common event if a comment is there, first I got no errors but it didn't work, now it is getting errors and doesn't work at all.
Code:
class Comment_Stuff
event = $game_map.events[event_id]
unless event.erased
unless event.list.nil?
event.list.each do |event_command|
if event_command.code == 108 && event_command.code == 408
string = event_command.paramters[0]
if string.include?('Test')
# Launch the common event
$game_temp.common_event_id = 8
end
end
end
end
end
end
I have no idea what this means, and I can't figure out what to do.
Can somebody help me with this simple script?
Please say it easy enough for a newb to understand. @_@
Thanks.