The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Scripting error 13 Type mismatch.

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 26th, 2020 (9:21 AM).
Superkonijn98 Superkonijn98 is offline
SMUSK
 
Join Date: Sep 2017
Posts: 4
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?
-----------------
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 28th, 2020 (10:34 AM).
Pyxal's Avatar
Pyxal Pyxal is offline
It's pronounced pixel.
 
Join Date: Jul 2019
Location: Pakistan
Age: 17
Posts: 987
Quote:
Originally Posted by Superkonijn98 View Post
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?
-----------------
At the trainerbattle command, you can clearly see that it's "winText" and at the end it's "winTex". Just change the "winTex" to "winText" And same is the case in "alreadyDefeated" and "alreadydefeated".
And this script looks a little messy. You'd do better by revising and rewriting it.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old June 5th, 2020 (3:03 AM).
Superkonijn98 Superkonijn98 is offline
SMUSK
 
Join Date: Sep 2017
Posts: 4
Oh thank you so much! its hard to notice grammatical errors like that for me.
I am just starting out with writing scripts so i hope to get better with writing better and organized scripts :)
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:15 AM.