• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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] I need help with my script

Ace Trainer Slash

If you give me about two hours, I can make scripts
  • 236
    Posts
    6
    Years
    Hello.

    I have made a script where a person will give the player a Pokemon when you talk to them. I then made this person to disappear. I haven't included any of the scripts to check for a full party because this is a starter Pokemon. This is the script I made. I followed a few guides like Avara's but nothing seems to be working at all. When I removed the nicknaming parts of the script and loaded the rest of it into the game, the game crashed when I interacted with the person that I gave the script below. When I have the nicknaming parts of the scripts in it, I keep getting an Error 9 'subscript out of range' on the text-string 'It's your newly caught Herdier\p[player]...' part of the script.

    What is wrong with my script?

    #dynamic 0x800000

    #org @start
    lock
    faceplayer
    msgbox @hi 0x6
    givepokemon 0x371 0x15 0x0 0x0 0x0 0x0
    fanfare 0x101
    msgbox @receive 0x4
    waitfanfare
    closeonkeypress
    msgbox @nick 0x5
    compare LASTRESULT 0x1
    if 0x1 call @YesToNick
    setflag 0x240
    hidesprite 0x1
    setflag 0x2F0
    release
    end

    #org @YesToNick
    setvar 0x8004 0x0
    call 0x81A74EB
    return

    #org @hi
    = Its your newly caught Herdier!\p[player]: Finally, a strong Pok\h1Bmon\n that's going to help me win the Pok\h1Bmon \lLeague. I've been waiting for this\lmoment ever since I first got\lthat Lillipup.

    #org @receive
    = You added Herdier to your party!

    #org @nick
    = Should I nickname it?

    Please someone help me with this. The demo I'm making falls apart if I can't at bare minimum get this script right.
     
    I'm not heaps au faut with scripting so ignore me kf this ks stupjd/wrong, but don't you need to define where the text strings are stored?

    At the moment it looks to me like you haven't put any offsets there.

    Are you using XSE and does the script compile?
     
    I forgot to say, I ended up spending most of my day yesterday and I got my whole script to work, including the person disappearing after the dialogue sequence happens. Only weird thing now is when nicknaming any other Pokemon given, it will go to nickname the Pokemon given in the script above. But that won't be difficult to solve. Thankyou for your help anyway!
     
    Back
    Top