The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Error 9 XSE

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 June 25th, 2014 (8:28 AM).
coolking49's Avatar
coolking49 coolking49 is offline
 
Join Date: Aug 2009
Location: Northfield, MN
Age: 27
Gender: Male
Nature: Adamant
Posts: 36
Hey, I'm having a problem with XSE.
Its been working well for a while now, but for this one code its giving me an error: "Error 9: "Subscript out of range" on line 59."
Its not the update problem which other problem people have had, given that I check settings.ini, and the update thing is set to 0.
here's the actual code:
Spoiler:

#dynamic 0x327EDA
#org @start
checkflag 0x200
if 0x1 goto @done
applymovement 0xFF @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x06 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x06 @move3
waitmovement 0x0
msgbox @3 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later

#org @later
setflag 0x200
msgbox @4 0x6
release
end

#org @4
= See! I see the same potential in\nall of you. Go out there and live\lit up!


#org @after
= As I expected, you have quite a\nbond with your pokemon!


#org @before
= I believe I am a good judge of\nthis sort of thing, and I honestly\lbelieve in each and every one of\lyou. Take [player] here, for\lexample. A little while ago, I met\l[player] and gave him his first\lpokemon, knowing that he has all\lthe potential in the world. It\lhasn't been very long, but I'm\lsure he's already grown quite\lclose to his pokemon.\lSo, [player], would you like to\lshow everyone here how close\lyou've gotten? Let's battle!


#org @move3
#raw 0x3
#raw 0x13
#raw 0x0
#raw 0xFE

#org @2
= But, if you take the time\nto\ntruly think about it, you\lwill\lfind that success is\lusually only\la small step away.\lYet despite\lthat it eludes most\lpeople. It is\lalways so near and\lyet so far. I believe each and\levery one of you can take that\lstep.


#org @move2
#raw 0x3
#raw 0x13
#raw 0x13
#raw 0x0
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @1
= Diego: To many, success seems\nto come\nsuddenly. When you\lobserve others\land what they\lhave achieved you\lusually don’t\lappreciate what it\lhas taken for\lthem to get where\lthey are.\lUltimately, in failing\lto do\lthis you also fail to learn\lwhat\lit would take for you to\lattain\lthe same level of\lachievement\land success.

#org @move1
#raw 0x1
#raw 0x11 <-- line 59
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @done
end



Any assistance would be incredible!
__________________
I'm a student at Carleton College, send me a message if you live around Northfield.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old June 25th, 2014 (5:28 PM).
JosefigGaming's Avatar
JosefigGaming JosefigGaming is offline
 
Join Date: May 2013
Location: Portugal
Age: 23
Gender: Male
Posts: 287
Quote:
Originally Posted by coolking49 View Post
Hey, I'm having a problem with XSE.
Its been working well for a while now, but for this one code its giving me an error: "Error 9: "Subscript out of range" on line 59."
Its not the update problem which other problem people have had, given that I check settings.ini, and the update thing is set to 0.
here's the actual code:
Spoiler:

#dynamic 0x327EDA
#org @start
checkflag 0x200
if 0x1 goto @done
applymovement 0xFF @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x06 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x06 @move3
waitmovement 0x0
msgbox @3 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later

#org @later
setflag 0x200
msgbox @4 0x6
release
end

#org @4
= See! I see the same potential in\nall of you. Go out there and live\lit up!


#org @after
= As I expected, you have quite a\nbond with your pokemon!


#org @before
= I believe I am a good judge of\nthis sort of thing, and I honestly\lbelieve in each and every one of\lyou. Take [player] here, for\lexample. A little while ago, I met\l[player] and gave him his first\lpokemon, knowing that he has all\lthe potential in the world. It\lhasn't been very long, but I'm\lsure he's already grown quite\lclose to his pokemon.\lSo, [player], would you like to\lshow everyone here how close\lyou've gotten? Let's battle!


#org @move3
#raw 0x3
#raw 0x13
#raw 0x0
#raw 0xFE

#org @2
= But, if you take the time\nto\ntruly think about it, you\lwill\lfind that success is\lusually only\la small step away.\lYet despite\lthat it eludes most\lpeople. It is\lalways so near and\lyet so far. I believe each and\levery one of you can take that\lstep.


#org @move2
#raw 0x3
#raw 0x13
#raw 0x13
#raw 0x0
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @1
= Diego: To many, success seems\nto come\nsuddenly. When you\lobserve others\land what they\lhave achieved you\lusually don’t\lappreciate what it\lhas taken for\lthem to get where\lthey are.\lUltimately, in failing\lto do\lthis you also fail to learn\lwhat\lit would take for you to\lattain\lthe same level of\lachievement\land success.

#org @move1
#raw 0x1
#raw 0x11 <-- line 59
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @done
end



Any assistance would be incredible!

The problem is that line 59 isn't the one pointed out, but rather this one:
Spoiler:
= Diego: To many, success seems\nto come\nsuddenly. When you\lobserve others\land what they\lhave achieved you\lusually don’t\lappreciate what it\lhas taken for\lthem to get where\lthey are.\lUltimately, in failing\lto do\lthis you also fail to learn\lwhat\lit would take for you to\lattain\lthe same level of\lachievement\land success.


I copied your script into xse, and that was line 59
Your problem is that the commands to change line are wrong
You use /n to change line
/l to change line after /n has been used

And the first three line changes are /n, only the first one should be /n, and all the rest should be /l

I'm assuming you already know this, since you usually come here with scripting questions and you seem to know scripting rather well
This was probably just a distraction
If this is not the case, check diegoisawesome's MEGA HUGE XSE tutorial to find all the other commands to switch line, new box, etc.
__________________
Working on:


#fasterSneasel :D (nohomo)

Coolest IRC with the coolest people in the coolest rooms:
http://chat.linkandzelda.com:9090/?channels=romhacking,gogo,discovery,fluorite
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old June 25th, 2014 (10:24 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Quote:
Originally Posted by JosefigGaming View Post
Your problem is that the commands to change line are wrong
You use /n to change line
/l to change line after /n has been used

And the first three line changes are /n, only the first one should be /n, and all the rest should be \l
Actually, that's not correct. XSE doesn't care whether you have the new lines entered correctly or not (the compiler doesn't check for that).

The real issue here is not your use of /n, rather your overly excessive use of \l in the Diego sentence.
Code:
Diego: To many, success seems\nto come\nsuddenly. When you\lobserve others\land what they\lhave achieved you\lusually don’t\lappreciate what it\lhas taken for\lthem to get where\lthey are.\lUltimately, in failing\lto do\lthis you also fail to learn\lwhat\lit would take for you to\lattain\lthe same level of\lachievement\land success.
You need to divide your sentance up with multiple /p's as well as /n's and /l's. Having that many /l's created an irritation for the compiler (it seems) and it refused to compile the line of text.
Not only is this sentence wacked out, but all of your text is like this. You'll have to go back and organize it a bit.

I remade your script with organized text, but it appears that you still have another problem:
Code:
msgbox @3 0x6
This line isn't being used anywhere in the script, so you have a type mis-match there. Delete that line of code (as well as the other things I told you) and your script will compile just fine.

This isn't a problem with compilation, but your script won't run if you don't add on to the end of your script:
Code:
#dynamic 0x327EDA
#org @start
checkflag 0x200
if 0x1 goto @done
applymovement 0xFF @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x06 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x06 @move3
waitmovement 0x0
msgbox @3 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later
---ORIGINALLY END OF SCRIPT---
You will have to add the command 'end' to the end. Not sure if this one is required, but it's good practice to do so.

Also, I noticed that the NPC you talk to that initiates this script doesn't disappear afterwards. I'm going to assume that you don't want the player to be able to talk to the NPC and get the same speech with no battle afterwards (because once the battle is finished, its flag will be set and the battle will no longer happen).
To avoid this, you will want to change:
Code:
checkflag 0x200
if 0x1 goto @done
Instead of checking a manual flag of 0x200 to stop the script from running again (which you didn't set anywhere), change this to a 'checktrainerflag' command so once the player defeats the NPC, the script will go straight to '@done' instead of waiting for some future event that sets flag 0x200.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old June 25th, 2014 (10:36 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
You can contact me in PC's discord server...
 
Join Date: May 2007
Age: 32
Gender: Male
Nature: Careful
Posts: 8,579
Quote:
Originally Posted by coolking49 View Post
Hey, I'm having a problem with XSE.
Its been working well for a while now, but for this one code its giving me an error: "Error 9: "Subscript out of range" on line 59."
Its not the update problem which other problem people have had, given that I check settings.ini, and the update thing is set to 0.
here's the actual code:
Spoiler:

#dynamic 0x327EDA
#org @start
checkflag 0x200
if 0x1 goto @done
applymovement 0xFF @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x06 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x06 @move3
waitmovement 0x0
msgbox @3 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later

#org @later
setflag 0x200
msgbox @4 0x6
release
end

#org @4
= See! I see the same potential in\nall of you. Go out there and live\lit up!


#org @after
= As I expected, you have quite a\nbond with your pokemon!


#org @before
= I believe I am a good judge of\nthis sort of thing, and I honestly\lbelieve in each and every one of\lyou. Take [player] here, for\lexample. A little while ago, I met\l[player] and gave him his first\lpokemon, knowing that he has all\lthe potential in the world. It\lhasn't been very long, but I'm\lsure he's already grown quite\lclose to his pokemon.\lSo, [player], would you like to\lshow everyone here how close\lyou've gotten? Let's battle!


#org @move3
#raw 0x3
#raw 0x13
#raw 0x0
#raw 0xFE

#org @2
= But, if you take the time\nto\ntruly think about it, you\lwill\lfind that success is\lusually only\la small step away.\lYet despite\lthat it eludes most\lpeople. It is\lalways so near and\lyet so far. I believe each and\levery one of you can take that\lstep.


#org @move2
#raw 0x3
#raw 0x13
#raw 0x13
#raw 0x0
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @1
= Diego: To many, success seems\nto come\nsuddenly. When you\lobserve others\land what they\lhave achieved you\lusually don’t\lappreciate what it\lhas taken for\lthem to get where\lthey are.\lUltimately, in failing\lto do\lthis you also fail to learn\lwhat\lit would take for you to\lattain\lthe same level of\lachievement\land success.

#org @move1
#raw 0x1
#raw 0x11 <-- line 59
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @done
end



Any assistance would be incredible!
Where's #org @3 ?

Also, your script crashes on me. I tried removing your texts and simply replacing them with Test and it compiled no problem.
So I guess I'm going to agree with Renegade here, that the XSE compiler "got annoyed" because you have placed FAR to many \l's and \n's in there. >.>


Quote:
Originally Posted by Renegade View Post
Also, I noticed that the NPC you talk to that initiates this script doesn't disappear afterwards. I'm going to assume that you don't want the player to be able to talk to the NPC and get the same speech with no battle afterwards (because once the battle is finished, its flag will be set and the battle will no longer happen).
To avoid this, you will want to change:
Code:
checkflag 0x200
if 0x1 goto @done
Instead of checking a manual flag of 0x200 to stop the script from running again (which you didn't set anywhere), change this to a 'checktrainerflag' command so once the player defeats the NPC, the script will go straight to '@done' instead of waiting for some future event that sets flag 0x200.
I believe this script is placed on a green 'S' tile, since the very start of the event, the player moves, probably towards an NPC.
__________________

Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old June 25th, 2014 (10:45 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Quote:
I believe this script is placed on a green 'S' tile, since the very start of the event, the player moves, probably towards an NPC.
Ah yeah, you're probably right.
Although it still wouldn't change the @done issue (unless flag 0x200 is set just after this script ends.)
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old June 25th, 2014 (10:49 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
You can contact me in PC's discord server...
 
Join Date: May 2007
Age: 32
Gender: Male
Nature: Careful
Posts: 8,579
Quote:
Originally Posted by Renegade View Post
Ah yeah, you're probably right.
Although it still wouldn't change the @done issue (unless flag 0x200 is set just after this script ends.)
The script will end. As seen in this code.
Code:
trainerbattle 0x1 0x001 0x0 @before @after @later
He used trainerbattle 0x1, meaning that after the battle, the script will continue to @later, where the setflag is located.

However, I predict that when the player steps on it again, the player will be stuck.
I suggest that the #org @done should have the release code in there as well.
__________________

Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old June 25th, 2014 (10:55 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Quote:
He used trainerbattle 0x1, meaning that after the battle, the script will continue to @later, where the setflag is located.
Oh dear, how did I miss the 0x1... -_-

But yeah, you're right.
And...
Quote:
However, I predict that when the player steps on it again, the player will be stuck.
I suggest that the #org @done should have the release code in there as well.
Spoiler:
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old June 26th, 2014 (8:26 AM).
coolking49's Avatar
coolking49 coolking49 is offline
 
Join Date: Aug 2009
Location: Northfield, MN
Age: 27
Gender: Male
Nature: Adamant
Posts: 36
Thanks guys!

That worked, my friend (whose working on the hack with me) added in all the suggested changes and here's what we got:

Spoiler:

#dynamic 0x71FB70
#org @start
lock
checkflag 0x200
if 0x1 goto @done
applymovement 0xFF @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x06 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x06 @move3
waitmovement 0x0
trainerbattle 0x1 0x001 0x0 @before @after @later
release
end

#org @later
setflag 0x200
msgbox @4 0x6
release
end

#org @4
= See! I see the same potential in\nall of you. Go out there and live\lit up!


#org @after
= As I expected, you have quite a\nbond with your pokemon!


#org @before
= I believe I am a good judge of\nthis sort of thing, and I honestly\lbelieve in each and every one of\lyou. Take [player] here, for\lexample. A little while ago, I met\l[player] and gave him his first\lpokemon, knowing that he has all\lthe potential in the world. It\lhasn't been very long, but I'm\lsure he's already grown quite\lclose to his pokemon.\lSo, [player], would you like to\lshow everyone here how close\lyou've gotten? Let's battle!


#org @move3
#raw 0x3
#raw 0x13
#raw 0x0
#raw 0xFE

#org @2
= But, if you take the time\nto\ntruly think about it, you\lwill\pfind that success is\lusually only\pa small step away.\lYet despite\pthat it eludes most\lpeople. It is\palways so near and\lyet so far. I believe each and\pevery one of you can take that\lstep.


#org @move2
#raw 0x3
#raw 0x13
#raw 0x13
#raw 0x0
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @1
= Diego: To many, success seems\nto come\nsuddenly. When you\lobserve others\pand what they\lhave achieved you\pusually don't\lappreciate what it\phas taken for\lthem to get where\pthey are.\lUltimately, in failing\pto do\lthis you also fail to learn\pwhat\lit would take for you to\pattain\lthe same level of\pachievement\land success.

#org @move1
#raw 0x1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @done
release
end


Now we have a problem. As soon as the script starts, the game freezes. It was intended to be a script which occurs when you enter a map, and the screen turned black. When I made it a normal script on a normal map to test it, it froze the game. Please advise.

Thanks!

edit: I'd guess there's something wrong with he first 5 lines of code, given that I don't move at all...
__________________
I'm a student at Carleton College, send me a message if you live around Northfield.
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old June 26th, 2014 (9:14 AM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Quote:
It was intended to be a script which occurs when you enter a map, and the screen turned black. When I made it a normal script on a normal map to test it, it froze the game.
So this is a level script? Make sure you have decompiled your script into XSE and fixed its 0xFFFF line with 0x0. Here a tutorial that might help you with that:
http://www.pokecommunity.com/showthread.php?t=191500
Quote:
added in all the suggested changes and here's what we got:
The text still isn't fixed. \n \l \p
__________________
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

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:09 AM.