The PokéCommunity Forums

The PokéCommunity Forums (
-   Pokémon Essentials (
-   -   Question Time Delay error (

AmethystRain September 5th, 2012 9:06 AM

Time Delay error
Oh look it's ame with more problems :c

So last week I created a time-delay event according to the instructions here. The only difference would be that I made the first/third pages parallel because it's a control event rather than something that the player interacts with. So I set it for a week, blahblahblah.
This week, this happens every time I step onto the map hosting that event:


Exception: RuntimeError
Message: Script error within map 37 (Lower Peridot Ward):
Exception: NoMethodError
Message: Section082:2065:in `setTempSwitchOn'undefined method `setTempSwitchOn' for nil:NilClass
***Full script:
Interpreter:243:in `pbExecuteScript'
(eval):1:in `pbExecuteScript'
Interpreter:1599:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:1599:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Game_Event_:262:in `update'
Interpreter:281:in `pbExecuteScript'
Interpreter:1599:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Game_Event_:262:in `update'
Game_Map_:336:in `update'
Game_Map_:334:in `each'
Game_Map_:334:in `update'
I copied the the code aside from the actual content of the event exactly from the Wiki... could it be because it's parallel, or is the information of that page outdateed, or... am I just failing?

Maruno September 5th, 2012 12:05 PM

Why are you changing something that already works? You don't need parallel processes.

Every time you enter a map, the event in question will run page 3 once (assuming its Self Switch A is on), and then go to either page 1 or 2 depending on whether the time has elapsed. That is, it only checks the elapsed time once while you're on that map, at the start of it. That shouldn't be a problem, though.

It would help if you told us what you were trying to do.

AmethystRain September 5th, 2012 3:56 PM

So even with an Action Trigger, it runs when the map is entered? That's not how events usually work in RM, so I'm a little confused.

Ame hurt herself in her confusion!

Okay, so one quick test later, I guess having that third page on Parallel IS causing the crash. But when I set it to action button, it doesn't trigger by itself. I have to go and 'talk' to the event, which no actual player can do.

The basic goal here is to create an event that, once a week, randomizes the overworld weather patterns for that week. Essentially all it does is define a set of variables. The weather itself is set by a common event called by other things (such as teleport events when exiting interiors). So the function of the delay event is pretty straight forward. I had to set it in the map rather than the ideal common event though, so I just chose a location that players should pass through often.

Maruno September 5th, 2012 4:42 PM

Your event's page 3 should be set to Autorun, as the wiki states. The two commands that are in it make sure that it only runs once, not repeatedly.

If all you want is to manipulate some switches and variables, then add those as event commands into page 3.

Actually, try something like this:


Page 1 (Action):

Page 2 (Autorun):
Depends on Global Switch with name s:expired?(25200)&&tsOff?("A")

@>Script: setTempSwitchOn("A")
@>Script: pbSetEventTime
@>Control Variables: [0042: Teh wetha!] += 1

Page 3 (Autorun):
Depends on Variable 0042 ==0

@>Control Variables: [0042: Teh wetha!] = 1
@>Script: pbSetEventTime

It's a bit different. Basically, page 3 initialises the weather and never matters again. Page 2 happens and progresses the weather if the time has elapsed, and if not, page 1 happens (i.e. nothing).

Of course, you'll have your own weather manipulation ideas. The above just shows where you'd put them. Make sure never to have a situation where page 3 would activate again.

AmethystRain September 5th, 2012 9:03 PM

Oh goodness how did I miss that Autorun comment.
Actually, I do know how. ._. When I finished the event I double checked against the screenshots of the event that are posted on the wiki page. The page 3 screenshot has it set to Action Button. Perhaps that should be fixed. ><
Still, should've read, derp.

Thanks for the tip about rearranging it though. I'll be trying that in the morning~

All times are GMT -8. The time now is 1:17 PM.

Like our Facebook Page Follow us on Twitter © 2002 - 2015 The PokéCommunity™,
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / Poké
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2015.