The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Error 13 Type mismatch when debugging

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 June 27th, 2020 (5:57 AM).
Skypaw101 Skypaw101 is offline
 
Join Date: Mar 2017
Posts: 4
I've just started learning how to script, and come accross this error. I'm not sure what it means or how to fix it. I'm also not sure how to format this post so that my script, below is in a box that can be shrunk or expanded. Some help would be appreciated.

When I debug the code in XSE I get the message [Error 13 "Type mismatch" on line 25. Missing dynamic label.] Line 25 just has "end"

I'm modding Pokemon FireRed, if that's relevant.

I was worried that the release commands might have something to do with it, because I'm not fully sure when to use them, but that doesn't seem to be the case.



#dynamic 0x71B140

#org @start
checkflag 0x828
if 0x1 call @done
checkflag 0x1007
if 0x1 call @next
msgbox @msg 0x2
setflag 0x1007
end

#org @next
checkflag 0x1009
if 0x1 call @nopkmn
msgbox @msg2 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @msg4 0x2
setflag 0x1009
release
end

#org @nopkmn
msgbox @msg5 0x2
end

#org @take
givepokemon 0x132 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg7 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @msg8 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @msg3 0x6
release
end

#org @done
msgbox @msg6 0x2
end

#org @msg/*First message if you have no pokemon*/
= Severus: I'm leaving today,\nmother. don't try to stop me! This\lis something I have to do.\pMom: But you don't even have a\npokemon yet! Are you sure? Sure\lthat you're ready?\pSeverus: I'll get one. Don't worry\nabout it.\pMom: Hmph. Well then. This is\ngoodbye. Be good.\pSeverus: Goodbye, Mother.

#org @msg2/*Second message if you have no pokemon. Offers a pokemon.*/
= When I was a trainer I didn't know\nwhat I was doing. I put myself\linto some dangerous situations and\lmy Bulbasaur paid the price. Be\lcareful, Severus. If you're so set\lon going, take my last Pokemon. I\lcaught her right before I came\lhome.

#org @msg3/*Message just after you recieve a pokemon.*/
= Be good to that Shroomish,\nSeverus. Don't make the same\lmistake I did.

#org @msg4/*Message just after you say no to a pokemon.*/
= No? I'm not sure professor\nDumbledore will have any pokemon\lleft for you to take.

#org @msg5/*Message when you talk to Mom after you say no, but don't have a pokemon.*/
= Your father would tell you to "Get\nout there and start exploring!"\lBut you don't have a pokemon yet.\lThat would be foolish.

#org @msg6/*Repeating Message if you have a pokemon. Heals you.*/
= Feeling tired? You can stay in\nyour old room, with your pokemon.

#org @msg7/*Game message*/
= [black_fr]You received a Shroomish!

#org @msg8/*second game message*/
= [black_fr]Would you like to give a\nnickname to Shroomish?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old June 28th, 2020 (9:49 AM).
Skypaw101 Skypaw101 is offline
 
Join Date: Mar 2017
Posts: 4
I've solved the problem. I have no idea how to delete this post, though. Viewing the forum through my phone doesn't seem to be giving me that option. Or the option to edit my previous post. So, sorry for double posting.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 9th, 2021 (8:10 AM).
Midnightblize Midnightblize is offline
 
Join Date: May 2021
Posts: 1
Im having same problem, how did you fix it?
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
Thread Tools

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:16 AM.