• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Other] Scripting Problem

  • 3
    Posts
    11
    Years
    • Seen May 19, 2014
    Hello scripters, I have a few questions for you.

    First off all, I can't get this script to work:
    Spoiler:


    As you can see, the character is supposed to goto @snippet2 if you answer Yes to the question. However, even if you answer No it still goes to @snippet2.

    The movement in @snippet2 isn't working properly either. The msgbox works just fine, but the character doesn't move or disappear at all. [S-HIGHLIGHT]Is there something wrong with the script?[/S-HIGHLIGHT]

    EDIT: Also, I had another ROM that I inserted a map and replaced a sprite in, and now it says "Error while creating backup, file not saved" when I try to open it with Advance Map. Is there something wrong with it?

    Best regards - Wetroz
     
    There's a problem write here, specifically on the third line of code.
    '---------------
    #org @snippet1
    msgbox @string2 0x5 '"Oh, I see you've become more\npopu..."
    if 0x1 goto @snippet2
    msgbox @string3 0x6 '"Oh well, guess I'm still too cool\..."
    release
    end

    '---------------
    You have a conditional statement that doesn't check any flags or the conditions to anything, specific, so it's likely ignored. You'll need a "compare LASTRESULT 0x" in the line before it.

    EDIT: Also, the "0x" after the waitmovement refers to time, not the event. You probably want that to be "0x0".

    More, make sure you put the variable numbers onto the script tile so that the movement will function. Make sure the event (or person number, my memory on this is a little hazy) that you point to in the applymovement is correct.
     
    Last edited:
    Spoiler:



    How I fixed it XD

    Code:
    #dynamic 0x806978
    
    #org @start
    faceplayer
    checkflag 0x1370
    if 0x1 goto @snippet1
    [B][COLOR=Red]compare LASTRESULT 0x0[/COLOR][/B]
    msgbox @string1 0x6
    release
    end
    
    #org @snippet1
    msgbox @string2 0x5 '"Oh, I see you've become more\npopu..."
    [B][COLOR=Red]compare 0x800D 0x1[/COLOR][/B]
    if 0x1 goto @snippet2
    [COLOR=Red][B]compare 0x800D 0x0[/B][/COLOR]
    [B][COLOR=Red]if 0x0 goto @snippetno[/COLOR][/B]
    release
    end
    
    #org @snippet2
    msgbox @string4 0x6 '"Then step right through this wall!..."
    applymovement 0x15 @move1
    waitmovement 0x15
    setflag 0x1243
    release
    end
    
    #org @snippetno
    [COLOR=Red][B]if 0x1 goto @snippet1[/B][/COLOR]
    msgbox @string3 0x6
    release
    end
    
    #org @string1
    = Shush, I'm creating a game here!\pCome back once you've earned some\nmore reputation around the school!
    
    #org @string2
    = Oh, I see you've become more\npopular now!\pHave you accepted me, Jesper, as\nyour lord and savior?
    
    #org @string3
    = Oh well, guess I'm still too cool\nfor you...
    
    #org @string4
    = Then step right through this wall!\pYou're welcome to my secret\nhideout!
    
    #org @move1
    #raw 0xE 
    #raw 0x60 
    #raw 0xFE
     
    Back
    Top