Script help with form changes

MagentaGiratina

Distortion World Enthusiast
Member
Joined
Jun 16, 2019
Posts
46
I modified this code from the code about Shaymin. What it's supposed to do is have the Pokemon go into its alternate form at night, but I'm getting a syntax error and don't understand why. Do I need to define that it needs to be in form 0 during the day too? I have next nil commented out since it was where the syntax error was the first time I tried it, but now it's saying the syntax error is in the line below it.

Code:
# Shroudeow #

MultipleForms.register(:SHROUDEOW,{
"type1"=>proc{|pokemon|
   next if pokemon.form==0     # Day
   next getID(PBTypes,:GHOST) # Night
},
"ability"=>proc{|pokemon|
   next if pokemon.form==0              # Day
   next getID(PBAbilities,:CURSEDBODY) # Night
},
"getForm"=>proc{|pokemon|
   next 1 if PBDayNight.isNight?(pbGetTimeNow) ||
#   next nil
},
"onSetForm"=>proc{|pokemon,form|
   pbSeenForm(pokemon)
}
})
 

Vendily

Cooltrainer
Member
Joined
May 16, 2017
Posts
130
You get a syntax error because of that || lying around. It wasn't expecting to find a } on the next processed line, so syntax.
 
Top