• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
4
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:

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • 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.
     
    990
    Posts
    4
    Years
  • 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.
     
    8
    Posts
    4
    Years
    • Seen Jul 7, 2020
    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
     
    8
    Posts
    4
    Years
    • Seen Jul 7, 2020
    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
     
    990
    Posts
    4
    Years
  • 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

    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.
     
    8
    Posts
    4
    Years
    • Seen Jul 7, 2020
    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
     
    8
    Posts
    4
    Years
    • Seen Jul 7, 2020
    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 ;/
     
    990
    Posts
    4
    Years
  • 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.
     
    8
    Posts
    4
    Years
    • Seen Jul 7, 2020
    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