Superkonijn98
SMUSK
- 4
- Posts
- 7
- Years
- Seen Dec 12, 2021
Hello, thank you for taking the time to read this.
I am currently learning how to write scripts and trying to get a script to work.
Its supposed to enter a [yes] [no] message box, yes results in a battle, no results in the end of a script without a battle occuring..
And at the end of the battle the NPC is supposed to give the player a pokémon.
i can't seem to get the script to work and keep getting error 13 Type mismatch.
Anyone who can help me out please?
Script
------------------------
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @t1 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @t2 0x6
release
end
#org @yes
trainerbattle 0x1 0x001 0x0 @introText @winText @continue
msgbox @alreadydefeated 0x6
#org @continue
msgbox @aftertext 0x6
checkflag 0x200
givepokemon 0x252 0x10 0x0 0x0 0x0 0x0
setflag 0x200
release
end
#org @aftertext
= [black_fr]As promised, here is your reward.
#org @alreadyDefeated
= [black_fr]Is Treecko doing fine?.
#org @t2
= [black_fr]Awww, if you change your\nmind then let me know!
#org @winTex
= Wow! That was fun!
#org @introText
= [black_fr]
#org @t1
= Hey, why that smirk on your face?\nWow you have beaten Roxanne!.\pThat makes two of us.\nWanna battle to see who is stronger?\pI must warn you\n I am very strong!\pBut if you defeat me i will...\nGive you an awesome reward!\pDeal?
-----------------
I am currently learning how to write scripts and trying to get a script to work.
Its supposed to enter a [yes] [no] message box, yes results in a battle, no results in the end of a script without a battle occuring..
And at the end of the battle the NPC is supposed to give the player a pokémon.
i can't seem to get the script to work and keep getting error 13 Type mismatch.
Anyone who can help me out please?
Script
------------------------
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @t1 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @t2 0x6
release
end
#org @yes
trainerbattle 0x1 0x001 0x0 @introText @winText @continue
msgbox @alreadydefeated 0x6
#org @continue
msgbox @aftertext 0x6
checkflag 0x200
givepokemon 0x252 0x10 0x0 0x0 0x0 0x0
setflag 0x200
release
end
#org @aftertext
= [black_fr]As promised, here is your reward.
#org @alreadyDefeated
= [black_fr]Is Treecko doing fine?.
#org @t2
= [black_fr]Awww, if you change your\nmind then let me know!
#org @winTex
= Wow! That was fun!
#org @introText
= [black_fr]
#org @t1
= Hey, why that smirk on your face?\nWow you have beaten Roxanne!.\pThat makes two of us.\nWanna battle to see who is stronger?\pI must warn you\n I am very strong!\pBut if you defeat me i will...\nGive you an awesome reward!\pDeal?
-----------------