• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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] Script Error (givepokemon)

Thoriére

[i]If everything's a dream, don't wake me.[/i]
  • 121
    Posts
    10
    Years
    I'm not quite a beginner, but whenever I test the following script, at the msgbox 0x5, it always defaults to "no". It compiles perfectly, but I'd like some help figuring out exactly what the issue could be. There are probably other bugs too.

    Code:
    #dynamic 0x823800
    
    #org @start
    lock
    faceplayer
    checkflag 0x828
    if 0x1 goto @done
    msgbox @1 0x5
    if 0x1 goto @take
    msgbox @3 0x6
    release
    end
    
    #org @take
    lock
    faceplayer
    msgbox @2 0x6
    givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @4 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    compare LASTRESULT 0x1
    if 0x1 call @name
    release
    end
    
    #org @name
    setvar 0x8004 0x0
    fadescreen 0x1
    special 0x9E
    waitstate
    return
    
    #org @done
    msgbox @6 0x6
    release
    end
    
    #org @1
    = Mom: Oh, good morning, \n\v\h01. Did you sleep well?\p...\pThat's good. A healthy night's\nsleep is very important.\pNow, are you ready for your\nbirthday present?
    
    #org @2
    = Mom: All right! Now, close your\neyes and cup your hands together\lin front of you.\p...\p...\p...\pMom: Okay! Open your eyes!\pMom: It's a Pok\h1Bmon!\nYour very own!
    
    #org @3
    = Mom: Is that so? Well, let me\nknow when you want it. I'll be\lhere all day.
    
    #org @4
    = You received an Eevee!
    
    #org @5
    = Would you like to give a\nnickname to Eevee?
    
    #org @6
    = Mom: I hope that raising your\nEevee will be a truly\lrewarding experience for you,\l\v\h01.\pIt can evolve into eight\ndifferent things, you know.\lVaporeon, Jolteon, Flareon,\lUmbreon, Espeon... Oh, and\lLeafeon and Glaceon, too!\lSylveon as well.\pEevee, like life, is full of\npossibilities.\pNow, go. The world awaits you!
     
    I'm not quite a beginner, but whenever I test the following script, at the msgbox 0x5, it always defaults to "no". It compiles perfectly, but I'd like some help figuring out exactly what the issue could be. There are probably other bugs too.

    You need to add the line 'compare 0x800D 0x1' after your 0x5 type message box command.
     
    Back
    Top