The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script I need help with my script

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old March 20th, 2022 (4:31 PM).
Ace Trainer Slash's Avatar
Ace Trainer Slash Ace Trainer Slash is offline
If you give me about two hours, I can make scripts without a guide!
 
Join Date: Jun 2018
Location: Australia.
Age: 20
Gender: Male
Nature: Jolly
Posts: 235
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 run Dedenne, and I don't regret it one bit!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 21st, 2022 (3:15 PM).
Tacobell24's Avatar
Tacobell24 Tacobell24 is offline
 
Join Date: Nov 2018
Posts: 232
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?
__________________
Praise the Solrock
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old March 21st, 2022 (3:33 PM).
Ace Trainer Slash's Avatar
Ace Trainer Slash Ace Trainer Slash is offline
If you give me about two hours, I can make scripts without a guide!
 
Join Date: Jun 2018
Location: Australia.
Age: 20
Gender: Male
Nature: Jolly
Posts: 235
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!
__________________
I run Dedenne, and I don't regret it one bit!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:20 AM.