• 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!
  • Red, Hilda, Paxton, or Kellyn - 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.

[Script] My first script keeps freezing

  • 3
    Posts
    4
    Years
    • Seen Jan 13, 2025
    So I made my first room script for my romhack, but everytime I step into the room that it occupies, the game stays at a black screen forever. Here's the script:

    '---------------
    #org 0x26DAAA
    lock
    applymovement MOVE_PLAYER 0x826DB09
    waitmovement 0x0
    fanfare 0x100
    waitfanfare
    msgbox 0x826DB0D MSG_KEEPOPEN '"Welcome to the Sevii Festival.\nRa..."
    showpokepic 0x3DD 0xA 0x3
    msgbox 0x826DB87 MSG_KEEPOPEN '"Type:Null!"
    hidepokepic
    givepokemon 0x3DD 0x5 0x0 0x0 0x0 0x0
    bufferpokemon 0x0 0x3DD
    fanfare 0x13E
    waitfanfare
    msgbox 0x826DB94 MSG_YESNO '"Would you like to give a nickname\..."
    compare LASTRESULT 0x1
    if 0x1 call 0x826DAFC
    release
    end

    '---------------
    #org 0x26DAFC
    setvar 0x8004 0x0
    fadescreen 0x1
    special 0x9E
    waitstate
    return


    '---------
    ' Strings
    '---------
    #org 0x26DB0D
    = Welcome to the Sevii Festival.\nRandomizing Starter Pokemon...\lCalculating...\lCalculating...\lYour Starter Pokemon is...\l

    #org 0x26DB87
    = Type:Null!

    #org 0x26DB94
    = Would you like to give a nickname\nto your Type:Null?


    '-----------
    ' Movements
    '-----------
    #org 0x26DB09
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)

    Can anyone tell me what's wrong? Thanks so much in advance. Virtual high fives for all.
     
    1) The last move command should have "#raw 0xFE" to signal the end of movements.
    2) Is it triggered upon entering? Make sure in the "Header" tab in Advance Map, the map script should be "02 validates values to 0x3B000030 (play..." as you can use most commands there.
     
    Back
    Top