- 4
- Posts
- 8
- Years
- Seen Jul 15, 2020
I am having difficulties with scripting my first long scene in which I move people around and use flags for different situations. I've run this script without the movements and it works fine, but as soon as I add the movement, the debugger says "too many parameters on line 23. The correct number is 2". When I try to run the ROM anyway, it freezes when I reach the correct square. I'm using XSE, and I've used this format for applymovement before to great effect. I'm not sure why I'm having difficulties now. I'm wondering if the problem has to do with how I set up the script in Advance map. I went to the Event tab for the correct map, and I changed the number of scripts to one more. But I made sure to save after this, so I know there isn't conflicting freespace. Anyway, the tutorials I'm using don't cover this thoroughly enough for me to know what's wrong. Uh, help would be appreciated!
#dynamic 0x800000
#org @start
checkflag 0x828
if 0x0 call @nopkmn
lock
msgbox @msg3 0x06
setflag 0x1011
setflag 0x1012
setflag 0x1013
setflag 0x1010
setvar 0x5002 0x1
release
end
#org @nopkmn
checkflag 0x1014
if 0x1 call @return
setflag 0x1014
lock
textcolor 0x00
msgbox @msg1 0x06
applymovement 0xFF @move1
waitmovement 0x0
msgbox @msg4 0x06
release
end
#org @return
lock
textcolor 0x00
msgbox @msg2 0x06
release
end
#org @move1
#raw 0x11
#raw 0xFE
#org @msg1
= You don't have a pokemon pt 1.
#org @msg4
= You don't have a pokemon pt 2.
#org @msg2
= You should get a pokemon.
#org @msg3
= You have a pokemon.
#dynamic 0x800000
#org @start
checkflag 0x828
if 0x0 call @nopkmn
lock
msgbox @msg3 0x06
setflag 0x1011
setflag 0x1012
setflag 0x1013
setflag 0x1010
setvar 0x5002 0x1
release
end
#org @nopkmn
checkflag 0x1014
if 0x1 call @return
setflag 0x1014
lock
textcolor 0x00
msgbox @msg1 0x06
applymovement 0xFF @move1
waitmovement 0x0
msgbox @msg4 0x06
release
end
#org @return
lock
textcolor 0x00
msgbox @msg2 0x06
release
end
#org @move1
#raw 0x11
#raw 0xFE
#org @msg1
= You don't have a pokemon pt 1.
#org @msg4
= You don't have a pokemon pt 2.
#org @msg2
= You should get a pokemon.
#org @msg3
= You have a pokemon.