• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • 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.

[Script] Error 13 Type mismatch when debugging

  • 4
    Posts
    8
    Years
    • Seen Jul 15, 2020
    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?
     
    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.
     
    Back
    Top