KotovSyndrome_
Consumer of many asparagus.
- 57
- Posts
- 16
- Years
- Wales
- Seen Jul 8, 2012
Well, the setflag is wrong. It should be setflag 0x1235, and not 0x4D3.
Oh yeah, thanks for pointing that out HackMew :)
Well, the setflag is wrong. It should be setflag 0x1235, and not 0x4D3.
I'm making a level script where it changes the sprite from a character on the map with "checkgender" (if you are male; the character is female. And if you are female; the character is male) but I don't know what command I should use to make that change...
I searched in Ruby that same script, but I only found some "setvar 0x4010 0x69" and "setvar 4010 0x64"... I don't know if that matters...
...
checkgender
compare LASTRESULT 0x0 // 0 == male
if B_TRUE call @female
compare LASTRESULT 0x1 // 1 == female
if B_TRUE call @male
...
#org @female
setvar 0x4010 0x69
return
#org @male
setvar 0x4010 0x64
return
I was making a script for Brock (The part where he gives you the badge for defeating him),in a hack I'm doing, but for some reason, it doesn't compile it says "Error 13 "type mismatch" on line 28. Missing Dynamic Label."
Game: FireRed
Type: Trainer Battle, Offical Battle
Editor: XSE
Script:
Spoiler:#dynamic 0x800000
#org @start
trainerbattle 0x1 0x19E 0x0 @intro @defeat @after
msgbox @msg2 0x2
end
#org @after
msgbox @msg 0x2
end
#org @intro
== I'm Brock, the Gym Leader\nof\nPewter City! If you want to\learn\lthe Boulder Badge, you need\lto battle me!
#org @defeat
= For your honor of winning, I\npresent you, the Boulder Badge!
#org @msg
= Good luck on your POKéMON journey!\nYou will face more powerful gym\lleaders than me.
#org @msg2
= Good luck young trainer. And\nbefore I forget....
#org @badge1get
checkflag 0x820
if 0x1 call @Next
setflag 0x820
msgbox @msg3 0x2
release
end
#org @Next
msgbox @msg4 0x2
clearflag 0x820
release
end
I did, but now I have a problem. When I talk to Brock, he says. "I'm Brock, the Gym leader of..." then it goes blank for four or so more blank lines, we battle, I won, but be doesn't give the badge.Ehm... you should read the error messages, because XSE told you what was wrong already. Missing dynamic label, indeed. That is, there's no msg3 nor msg4 texts in your script.
So there's nothing wrong with the script?Make sure you have the right ID number and like I said before If a flag doesn't work just switch over to a var. Also try re-pointing the script to a different location.
So, I decided to make another script since that one wouldn't work. But this one, unfortunately, doesn't work either.
The movements won't happen and the flag 0x1600 won't work.
Spoiler:#include stditems.rbh
;---------------
#org 0x810FD2
lock
checkitem ITEM_GOLDTEETH 0x1
compare LASTRESULT 0x1
if 0x1 goto 0x8812448
checkflag 0x1600
compare LASTRESULT 0x1
goto 0x88123F6
;---------------
#org 0x812448
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x88125E7 MSG_NORMAL ;"You've got the PIKA-CHEW!\nI knew ..."
sound 0x15
applymovement 0x7 0x881268B
waitmovement 0x0
msgbox 0x8812645 MSG_NORMAL ;"I'm getting my AMULET COIN back!\n..."
applymovement 0x7 0x881267F
waitmovement 0x0
pause 0x83
fadescreen 0x1
hidesprite 0x7
setflag 0x27E
fadescreen 0x0
setvar 0x5824 0x1
release
end
;---------------
#org 0x812422
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x88125AD MSG_NORMAL ;"You need to go to EGGNEST TOWN and..."
applymovement 0x7 0x881267F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8812688
release
end
;---------------
#org 0x8123F6
fadesong 0x121
applymovement 0x7 0x8812675
waitmovement 0x0
msgbox 0x881248E MSG_NORMAL ;"MR. [player], would you help me?\p..."
setflag 0x1600
applymovement 0x7 0x881267F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8812688
fadedefault
release
end
;---------
; Strings
;---------
#org 0x8125E7
= You've got the PIKA-CHEW!\nI knew you could do it!\pI'll go feed it to the crazy\nMURKROW now.
#org 0x812645
= I'm getting my AMULET COIN back!\nYes yes yes!
#org 0x8125AD
= You need to go to EGGNEST TOWN and\nmeet RYAN, remember?
#org 0x81248E
= MR. [player], would you help me?\pThere's a MURKROW back there and\nit appears it's gone crazy!\pIt even stole my AMULET COIN!\p... ... ...\n... ... ...\pI know!\pCould you please, please, please\ngo the EGGNEST TOWN? My grandson\llives there, named RYAN.\pJust talk to him and he'll know\nwhat to do.
;-----------
; Movements
;-----------
#org 0x812675
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x12 ;Step Left (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements
#org 0x81268B
#raw 0x62 ;Exclamation Mark (!)
#raw 0xFE ;End of Movements
#org 0x81267F
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x13 ;Step Right (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0x11 ;Step Up (Normal)
#raw 0xFE ;End of Movements
#org 0x812688
#raw 0x10 ;Step Down (Normal)
#raw 0xFE ;End of Movements
What could be causing the problem?
Thanks, Pokepal17!Checkflags don't need compare LASTRESULT because the command would be checking what's in LASTRESULT and not what the flag value is.
Fixed in script~
It's because badge string practically doesn't exist...I did, but now I have a problem. When I talk to Brock, he says. "I'm Brock, the Gym leader of..." then it goes blank for four or so more blank lines, we battle, I won, but be doesn't give the badge.
You don't have to tell me I'm aware of it, I just copied the strings from his script.@Ash493,
you can't put two \n next to each other. Leader\nof\nPewter change one of the \n to \p or \l, or simply remove one.
You don't have to tell me I'm aware of it, I just copied the strings from his script.