- 5,256
- Posts
- 17
- Years
- Age 27
- Leicester, UK
- Seen Mar 31, 2025
I downloaded and installed, but got the same error. Is there something wrong with the first line of my script?
Yes, see Lost Heart's post.
I downloaded and installed, but got the same error. Is there something wrong with the first line of my script?
Since you're using Emerald, it's best to use the command 'freespace 0xFF' after the #dynamic command to ensure that the correct type of freespace is used.
Followed what Lost Heart said and fixed the script. The amount of help and I've received from this thread, as well as stuff that I've learned, is tremendous. You guys are the best!
Let me clear this up a bit. This info is gathered from a ton of sources I don't even remember (pretty sure it was from this forum), but here's the deal. For the longest time, it was assumed 0x00 was the freespace byte in Emerald. Problem is, most 0x00s are not actually freespace, but rather part of the sound or instrument data or something (my memory is kinda foggy). Emerald's freespace byte is 0xFF, it's just that older tools like XSE think it's 0x00 because that's what everyone thought when they were made. That's exactly why sound corruption occurs in Emerald. Then the bigger problem is that Emerald doesn't have an enormous chunk of 0xFFs like FireRed does, so you're just better off expanding the ROM to 32MB using 0xFF as the freespace byte to ensure tools won't overwrite what they shouldn't (I'm pretty sure AdvanceMap's INI lets you configure what freespace byte to use). This is actually quite a debate, if GBA games use 0x00 or 0xFF as freespace, but as far as Pokémon hacking goes, it's practically settled that 0xFF is the freespace byte in all the games.
tl;dr; 0x00 is not actually the freespace byte in Emerald. Most 0x00s are part of music data, which causes sound corruption. 0xFF is the true freespace byte and there's not much of it, which is why most Emerald hackers expand their ROMs.
#org @start
checkflag 0x829
if 0x1 goto @snippet1
applymovement MOVE_PLAYER @move1
waitmovement 0x0
msgbox @string1 MSG_NORMAL '"MAILMAN: You're [player], right? Y..."
setflag 0x829
msgbox @string2 MSG_NORMAL '"MAILMAN: I have your Pokèdex here,..."
release
end
'---------------
#org @snippet1
clearflag 0x829
release
end
Does anyone know why this script plays every time the tile is touched, even though I put "clearflag?"
Whenever I compile this script
Spoiler:#dynamic 0x804100
#org @main
lock
applymovement 2 @lookdown
waitmovement 0
msgbox @1 MSG_YESNO
compare LASTRESULT 0x0
if 0x1 call @no
compare LASTRESULT 0x1
if 0x1 call @yes
msgbox @2 0x6
applymovement 2 @godown
waitmovement 0
hidesprite 2
setflag 0x360
setvar 0x403B 0x1
release
end
and then decompile it, it comes out as this:
Spoiler:#org 0x80469F
lock
applymovement 0x2 0x8804861
waitmovement 0x0
msgbox 0x88046FC MSG_YESNO '"[blue_fr][rival]: Hey, [player]!\n..."
compare LASTRESULT 0x0
#raw 0x7
#raw pointer 0x8046E801
gotostd 0x21
It cuts off the rest of the script. Is there a reason it does this? Is it something I'm doing or is it a bug? It's happened to me before but now I can't fix it. Any help would be appreciated
Can you provide the whole script(with all dynamic pointers), so we get more context?Whenever I compile this script
Spoiler:#dynamic 0x804100
#org @main
lock
applymovement 2 @lookdown
waitmovement 0
msgbox @1 MSG_YESNO
compare LASTRESULT 0x0
if 0x1 call @no
compare LASTRESULT 0x1
if 0x1 call @yes
msgbox @2 0x6
applymovement 2 @godown
waitmovement 0
hidesprite 2
setflag 0x360
setvar 0x403B 0x1
release
end
and then decompile it, it comes out as this:
Spoiler:#org 0x80469F
lock
applymovement 0x2 0x8804861
waitmovement 0x0
msgbox 0x88046FC MSG_YESNO '"[blue_fr][rival]: Hey, [player]!\n..."
compare LASTRESULT 0x0
#raw 0x7
#raw pointer 0x8046E801
gotostd 0x21
It cuts off the rest of the script. Is there a reason it does this? Is it something I'm doing or is it a bug? It's happened to me before but now I can't fix it. Any help would be appreciated
hi guys i am having problem with this script it is not working the game get freeze when player walk on it
Spoiler:'---------------
#org 0x1615B2
lockall
msgbox 0x8162D07 MSG_NORMAL '"And Nidorina begins the battle\nwi..."
showsprite 0x2
applymovement 0x2 0x8163099
waitmovement 0x0
applymovement MOVE_PLAYER 0x81630A1
playsong 0x112 0x0
pause 0x20
msgbox 0x8162E87 MSG_NORMAL '" PLAYER's name , get to bed! It's\..."
msgbox 0x8162F6B MSG_NORMAL '"Prof Oak on TV: Good evening\nPall..."
applymovement 0x2 0x81630A5
waitmovement 0x0
hidesprite 0x2
setflag 0x300
fadesong 0x155
waitstate
end
'---------
' Strings
'---------
#org 0x162D07
= And Nidorina begins the battle\nwith a horn attack. Oh, but\lGengar bounces right back- and\lthere it is the hypnosis power of\lGengar. This could be the end of\lNidorina. Wait, the trainer\lrecalls Nidorina. Which Pokémon\lwill he use now? Oh, its Onix!\lNow this giant Pokémon is on the\lattack. Oh, but Gengar jumps\laside. Gengar is moving\lbeautifully today, its training\lis top notch...
#org 0x162E87
= PLAYER's name , get to bed! It's\n11\lo'clock, and you should be asleep\l\p But I'm just so psyched to\lstart trainin', winnin', and\lbattlin'!\l\pWell, if you can't sleep you\lshould at least get ready for\ltomorrow. Here watch this.
#org 0x162F6B
= Prof Oak on TV: Good evening\nPallet. Tomorrow is the big day\lfor the newest class of Pokémon\lstudents. I'd like to introduce\lyou to Bulbasaur, Charmander, and\lSquirtle. Each one is available\lfor new trainers, which one shall\lyou choose.\pGo to bed when this\lis done\lAnd change into your pajamas okay?
'-----------
' Movements
'-----------
#org 0x163099
#raw 0xE 'Step Left (Slow)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xF 'Step Right (Slow)
#raw 0xFE 'End of Movements
#org 0x1630A1
#raw 0x3 'Face Right
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x1630A5
#raw 0xE 'Step Left (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xF 'Step Right (Slow)
#raw 0xFE 'End of Movements
Can you provide the whole script(with all dynamic pointers), so we get more context?
Yeah, just put 'releaseall' before end.
still it is not working still getting freeze
i also try that not workingSame problem as mentioned before - you need to use variables for green script tiles :).
Whenever I compile this script
Spoiler:#dynamic 0x804100
#org @main
lock
applymovement 2 @lookdown
waitmovement 0
msgbox @1 MSG_YESNO
compare LASTRESULT 0x0
if 0x1 call @no
compare LASTRESULT 0x1
if 0x1 call @yes
msgbox @2 0x6
applymovement 2 @godown
waitmovement 0
hidesprite 2
setflag 0x360
setvar 0x403B 0x1
release
end
and then decompile it, it comes out as this:
Spoiler:#org 0x80469F
lock
applymovement 0x2 0x8804861
waitmovement 0x0
msgbox 0x88046FC MSG_YESNO '"[blue_fr][rival]: Hey, [player]!\n..."
compare LASTRESULT 0x0
#raw 0x7
#raw pointer 0x8046E801
gotostd 0x21
It cuts off the rest of the script. Is there a reason it does this? Is it something I'm doing or is it a bug? It's happened to me before but now I can't fix it. Any help would be appreciated
i also try that not working
i checked it more then one time but not workingSomething is clashing, your script and something else. Perhaps you've tried editing another script or accidentally reused the same offset.
For #dynamic just use 0x740000/800000. There's no need to free-space-find the number.
It will! :) Check your variable info on the tile, make sure it matches the setvar in your script, etc.
i checked it more then one time but not working
Spoiler:#dynamic 0x163891
#org @start
lock
checkflag 0x9C
if 0x1 goto @sleep
msgbox 0x4 @change
closeonkeypress
release
end
#org @0x8085DB
checkflag 0x01
if 0x1 goto @notime
msgbox 0x6 @went
end
#org @sleep
setflag 0x600
msgbox 0x4 @dream
closeonkeypress
fadescreen 0x1
pause 0x1E
showpokepic 0x1 0x2 0x2
cry 0x1 0x1
msgbox 0x4 @BULBASAUR
closeonkeypress
hidepokepic
pause 0x1E
showpokepic 0x7 0xA 0x2
cry 0x4 0x1
msgbox 0x4 @SQUIRTLE
closeonkeypress
hidepokepic
pause 0x1E
showpokepic 0x4 0x12 0x2
cry 0x7 0x1
msgbox 0x4 @CHARMANDER
closeonkeypress
hidepokepic
pause 0x1E
msgbox 0x4 @wokeup
closeonkeypress
end
#org @went
= You can't sleep untill you wear\npajama.
#org @notime
= YOU can't sleep now.
#org @BULBASAUR
= Raisin' a Bulbasaur. Tis really\nSimple. Its perfect, for awesome\ltrainers, like me. [In his dream he throws ball and releases Bulbasaur] I Choose\lyou, Bulbasaur!
#org @SQUIRTLE
= here's Squirtle. I Choose you\nSquirtle! Choose it or lose it.
#org @CHARMANDER
= Hold on, Charmander, those who\nknow ya say you're the go-to\lPokemon. I choose you, Charmander!
#org @wokeup
= Oh no! What's the time? Squirtle,\nBulbasaur, Charmander- any one's\lfine, just please save one for me.
i am getting error in this script can anyone resolve the error is
(Error 13 type mismatch on line 6 missing #define)
msgbox 0x4 @change
Line 6:
You have no #org @change. Also you're using dynamic offsets really wrong ): just put #dynamic 0x800000 at the top of your script and leave it at that.