• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Red, Kris, May - which Pokémon protagonist is your favorite? Let us know by voting in our semifinal favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Archive] Script help thread

Status
Not open for further replies.
For some reason XSE gets mad at me when I ask it to compile a script. It seems to dislike the msgbox2 line:

Code:
#define 0x800000
...
#org 0x80005A
[B]msgbox2 @whichpoke[/B]
waitmsgbox
multichoice 0x0 0x0 0x3E 0x1
copyvar LASTRESULT 0x1004
...
#org @whichpoke
= So which one would you like?
...
It says "Error 13 'type mismatch' ... missing #define or parameter"

Only there isn't... It's weird because the debug machine doesn't mind it.


Use waitmsgbox2 instead of waitmsgbox.
You are using XSE, right?
What's #org 0x80005A for?
In XSE, you don't use offsets as pointers, you use random names.
That's what I know.
If it didn't work, then maybe your XSE lacks commands, such as msgbox2.
 
Try this:

Spoiler:


I tried it and it worked.
Sorry if it didn't help, though.

no, i don'y think you understand the problem, the script works fine, BUT when the map is reloaded (you leave the room and come back into the room) the script can be played again, and i want it to used once and the sprite with the script is gone and never seen again, how?
 
no, i don'y think you understand the problem, the script works fine, BUT when the map is reloaded (you leave the room and come back into the room) the script can be played again, and i want it to used once and the sprite with the script is gone and never seen again, how?
That is because you didn't do this by the first checkflag:

checkflag 0x821 <---- CHECKFLAG AND THEN
if B_true goto $done
blab bla blab alab
END

#org $done
release
end

Or maybe I just don't understand what you mean XD
 
That is because you didn't do this by the first checkflag:

checkflag 0x821 <---- CHECKFLAG AND THEN
if B_true goto $done
blab bla blab alab
END

#org $done
release
end

Or maybe I just don't understand what you mean XD

yes ive tried that too, and when you click the sprite(after the script has been ran through once and the map has been reloaded) he instantly disappears, but i need him to be "disappeared" before i click on him
 
yes ive tried that too, and when you click the sprite(after the script has been ran through once and the map has been reloaded) he instantly disappears, but i need him to be "disappeared" before i click on him
If you used XSE you could use movesprite2 at the end of your script, instead of those #raw codes. and since movesprite2 is a permanent move, you don't need a level script to keep him hidden, you just need to be sure you move the sprite to a spot where he cant be seen ever.
I suggest making the switch...
 
yes ive tried that too, and when you click the sprite(after the script has been ran through once and the map has been reloaded) he instantly disappears, but i need him to be "disappeared" before i click on him

hmm try putting this number 003B under person id in advance map
 
Use waitmsgbox2 instead of waitmsgbox.
You are using XSE, right?
What's #org 0x80005A for?
In XSE, you don't use offsets as pointers, you use random names.
That's what I know.
If it didn't work, then maybe your XSE lacks commands, such as msgbox2.

Oh, well I'll try that. I did use names, but I've compiled it since (in order to test the first part), so that's why some of has specific no.'s

EDIT: OK, found the cause: didn't have callstd... silly me. BTW there's no such command as "waitmsgbox2"

EDIT2: It still doesn't like it. I even tried an ordinary msgbox...
 
Last edited:
For some reason XSE gets mad at me when I ask it to compile a script. It seems to dislike the msgbox2 line:

Code:
#define 0x800000
...
#org 0x80005A
[B]msgbox2 @whichpoke[/B]
waitmsgbox
multichoice 0x0 0x0 0x3E 0x1
copyvar LASTRESULT 0x1004
...
#org @whichpoke
= So which one would you like?
...

It says "Error 13 'type mismatch' ... missing #define or parameter"

Only there isn't... It's weird because the debug machine doesn't mind it.
Could you post the entire script? It seems like you've cut some things out. The error you get is usually when you have misspelt a command or tried to use one that doesn't exist. Also, aren't you supposed to use copyvar 0x8000 LASTRESULT after multichoice?
 
Could you post the entire script? It seems like you've cut some things out. The error you get is usually when you have misspelt a command or tried to use one that doesn't exist. Also, aren't you supposed to use copyvar 0x8000 LASTRESULT after multichoice?

Dshayabusa is right.
copyvar 0x1004 LASTRESULT It should be like this.
And dshayabusa, is there a command called waitmsgbox2?

 
Oh ok, thanks for the info.
Anyways, I saw a script in a website just now, there is a command in poke script called vardisplay 0x0 0x8005.
What's that?
Thanks in advance
 
Oh ok, thanks for the info.
Anyways, I saw a script in a website just now, there is a command in poke script called vardisplay 0x0 0x8005.
What's that?
Thanks in advance
vardisplay? I've never heard of it, but by the look of its parameters it could just be an edited name for setvar/checkvar or it could be a command that buffers the value in a variable.
 
Why 003B? It should correspond with the flag used for that event, you need to use 0821 (shouldn't it be 828?).

hmm i m nt too sure myself but it work out for me...u mean the ppl id should correspond with the flag?
 
Oh ok, thanks for the info.
Anyways, I saw a script in a website just now, there is a command in poke script called vardisplay 0x0 0x8005.
What's that?
Thanks in advance

That was a command in an old version of the ScriptDEC decompiler. Which Dabomstew added to a pokescript 'fix'. It isn't apart of a default Pokescript installation. I know that because I still use that name.

In XSE, I think it's buffervar or buffervariable or something like that? It's command &h83.
 
OK, I've finally solved it. For some reason XSE didn't want to have dynamic offsets as well as static ones (which had appeared because I decompiled my own script from the ROM due to loss of data), so I just used a Hex Ed and voilá...
 
That was a command in an old version of the ScriptDEC decompiler. Which Dabomstew added to a pokescript 'fix'. It isn't apart of a default Pokescript installation. I know that because I still use that name.

In XSE, I think it's buffervar or buffervariable or something like that? It's command &h83.

Thanks thethethethe.
When I saw it, it was used in the multi command,
like for example:

#org $option1
setvar 0x8005 0x1
vardisplay 0 0x8005
message $display
boxset 0x6
end

I tried it out the script first, but didn't work.
Then I added this command:
addcmmd vardisplay #83
to the database and it worked.
Anyway, Thank you for clearing it up, thethethethe.
 
I posted this script a while ago, and it still doesn't work....

Code:
#Dynamic 0x800000

#org @start
lockall
setvar 0x5040 0x0
goto @script
return

#org @script
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
return

#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end

#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end

#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_true goto @havedex
checkflag 0x829
if b_false goto @nodex
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end

#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?

#org @getdex
msgbox @receivedex
boxset 0x6
fanfare 0x13E
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
releaseall
end

#org @receivedex
= [player]'s POKéDEX got upgraded.

#org @notwant
msgbox @no
boxset 0x6
releaseall
end

#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.

#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end

#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.

#org @gone
hidesprite 0x9
end

#org @move0
#raw 0x4E
#raw 0xFE

#org @move1
#raw 0x06
#raw 0xFE

#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE

I suck at setvar, I hardly know how to use it correctly. NOTE:The script works partially. The aide who needs to say the message says messages, but 1) The message is the wrong one, which means the checkflag for pokedex doesn't works correctly (and yes, I do have the pokedex) and 2) He won't face left to me.

Someone knows what's wrong with this?
 
I posted this script a while ago, and it still doesn't work....

Code:
#Dynamic 0x800000

#org @start
lockall
setvar 0x5040 0x0
goto @script
return

#org @script
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
return

#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end

#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end

#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_true goto @havedex
checkflag 0x829
if b_false goto @nodex
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end

#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?

#org @getdex
msgbox @receivedex
boxset 0x6
fanfare 0x13E
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
releaseall
end

#org @receivedex
= [player]'s POKéDEX got upgraded.

#org @notwant
msgbox @no
boxset 0x6
releaseall
end

#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.

#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end

#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.

#org @gone
hidesprite 0x9
end

#org @move0
#raw 0x4E
#raw 0xFE

#org @move1
#raw 0x06
#raw 0xFE

#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE
I suck at setvar, I hardly know how to use it correctly. NOTE:The script works partially. The aide who needs to say the message says messages, but 1) The message is the wrong one, which means the checkflag for pokedex doesn't works correctly (and yes, I do have the pokedex) and 2) He won't face left to me.

Someone knows what's wrong with this?

To upgrade your pokedex to national dex, use special 0x16F not 0x1F3.
In what applymovement $pointer do you want the aide to face you left?
To face left, use #raw 0x02.
Is this for ruby or firered?
 
Status
Not open for further replies.
Back
Top