• 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!
  • 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] An error, please help!

  • 8
    Posts
    5
    Years
    • Seen Jul 7, 2020
    I want to implement a new repel system into this FR hack i'm making and i've got the hex coding for it complete. I just need to do something in XSE and i keep getting an error message

    After copy and pasting the code, I hit 'compile" and an error message pops up "Error 13: mismatch/ #define is missing" and it points out that the error was committed on line 6. I'm not sure what to do or what to add since i did everything correctly :(

    #dynamic 0x8797A7

    #org @main
    lock
    checkitem 0x800E 0x1
    compare LASTRESULT 0x1 <--- line 6
    if 0x4 goto @HaveRepel
    msgbox @RepelWoreOff 0x3
    release
    end

    #org @HaveRepel
    msgbox @UseAgain 0x5
    closeonkeypress
    compare LASTRESULT 0x1
    if 0x1 goto @ASM
    end

    #org @ASM
    callasm 0x081BFB69
    end

    #org @RepelWoreOff
    = Repel's effect wore off.

    #org @UseAgain
    = Repel's effect wore off,\pWould you like to use another?

    For some context, watch Repel mod for FireRed on YT, should be the first video
     
    Last edited:
    The issue is that that the variable LASTRESULT isn't being parsed correctly into becoming 0x800D. I suspect that you're using an outdated version of XSE so try using this one. Alternatively, you could replace both instances of LASTRESULT in your script into 0x800D.
     
    I want to implement a new repel system into this FR hack i'm making and i've got the hex coding for it complete. I just need to do something in XSE and i keep getting an error message

    After copy and pasting the code, I hit 'compile" and an error message pops up "Error 13: mismatch/ #define is missing" and it points out that the error was committed on line 6. I'm not sure what to do or what to add since i did everything correctly :(

    #dynamic 0x8797A7

    #org @main
    lock
    checkitem 0x800E 0x1
    compare LASTRESULT 0x1 <--- line 6
    if 0x4 goto @HaveRepel
    msgbox @RepelWoreOff 0x3
    release
    end

    #org @HaveRepel
    msgbox @UseAgain 0x5
    closeonkeypress
    compare LASTRESULT 0x1
    if 0x1 goto @ASM
    end

    #org @ASM
    callasm 0x081BFB69
    end

    #org @RepelWoreOff
    = Repel's effect wore off.

    #org @UseAgain
    = Repel's effect wore off,\pWould you like to use another?

    For some context, watch Repel mod for FireRed on YT, should be the first video

    First, like DrFugi said, you should be using XSE v1.1.1. But I believe the error is being caused because it seems that you didn't remove the "<--- line 6" phrase.
     
    First, like DrFugi said, you should be using XSE v1.1.1. But I believe the error is being caused because it seems that you didn't remove the "<--- line 6" phrase.

    oh idk why thats there but it is not in the actual script lol
     
    Hmm... But when I compiled it (removing the "<--- line 6"), it gave me no errors.

    let me try again, also when I try to respond to DrFuji it gives me an "sorry you cant post any links" yet I'm able to respond to you
     
    The issue is that that the variable LASTRESULT isn't being parsed correctly into becoming 0x800D. I suspect that you're using an outdated version of XSE so try using this one[/URL]. Alternatively, you could replace both instances of LASTRESULT in your script into 0x800D.


    is there a way to save the script to the rom after clicking compile? I switched LASTRESULT to 0x800D and it compiled! but in-game, the option to use repel again w/o going into ur bag didn't appear :( and I did everything in the YT tutorial as well
     
    That's because DrFugi's post has used links to certain pages.
    New members on the PokéCommunity cannot post links. Try deleting the portion in Quotes Section to reply.

    thank you, I was finally able to compile it however, in-game (this is for BW2 repel system) the option did not come up ;/
     
    thank you, I was finally able to compile it however, in-game (this is for BW2 repel system) the option did not come up ;/


    Try this:
    Code:
    #dynamic 0x800000
    
    #org @main
    lock
    checkitem 0x800E 0x1
    compare LASTRESULT 0x1
    if 0x4 goto @HaveRepel
    msgbox @RepelWoreOff 0x3
    release
    end
    
    #org @HaveRepel
    msgbox @UseAgain 0x5
    closeonkeypress
    compare LASTRESULT 0x1
    if 0x1 goto @ASM
    end
    
    #org @ASM
    callasm 0x081BFB69
    end
    
    #org @RepelWoreOff
    = Repel's effect wore off.
    
    #org @UseAgain
    = Repel's effect wore off,\pWould you like to use another?

    But in the end, you can use Hex Helper Double OH! or TL's Quick Enhancer to implant it.
     
    Try this:
    Code:
    #dynamic 0x800000
    
    #org @main
    lock
    checkitem 0x800E 0x1
    compare LASTRESULT 0x1
    if 0x4 goto @HaveRepel
    msgbox @RepelWoreOff 0x3
    release
    end
    
    #org @HaveRepel
    msgbox @UseAgain 0x5
    closeonkeypress
    compare LASTRESULT 0x1
    if 0x1 goto @ASM
    end
    
    #org @ASM
    callasm 0x081BFB69
    end
    
    #org @RepelWoreOff
    = Repel's effect wore off.
    
    #org @UseAgain
    = Repel's effect wore off,\pWould you like to use another?

    But in the end, you can use to implant it.

    is there a way to save the script to the rom in XSE?
     
    Back
    Top