Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Help with Esper/Junction problem., I need some help with a script I found.
Nof56
post Oct 31 2011, 02:52 PM
Post #1


Level 4
Group Icon

Group: Member
Posts: 47
Type: Developer
RM Skill: Beginner




I found this script
The URL for the script
http://www.rpgrevolution.com/forums/index.php?showtopic=37779&hl=Esper/Junction&st=0


And I run into a problem every time I try to call the script that I need to add an Esper into the player's Esper inventory. NOTE: I try this when I try to enter one esper at a time.

The problem reads "Argument Error occurred while running script. wrong number of arguments (0 for 1)"

I looked all over forums and even read the one I provided. Although I can't seem to find whats wrong. I tried fixing the script but I know vary little about ruby so I need some help. Thanks!


__________________________
S.P.O.R.D.<- Military acronym meaning Steaming Pile of Rectal Discharge.

Go to the top of the page
 
+Quote Post
   
Tsukihime
post Oct 31 2011, 08:44 PM
Post #2


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




How are you calling the script.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Nof56
post Nov 1 2011, 08:03 AM
Post #3


Level 4
Group Icon

Group: Member
Posts: 47
Type: Developer
RM Skill: Beginner




I call the script using "$game_party.gain_esper (ESPER::CACTUAR)" using the Esper Cactuar, but for some reason it cannot call just one.


__________________________
S.P.O.R.D.<- Military acronym meaning Steaming Pile of Rectal Discharge.

Go to the top of the page
 
+Quote Post
   
Tsukihime
post Nov 1 2011, 02:07 PM
Post #4


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




Make sure your script is not something like

CODE
$game_party.gain_esper
(ESPER::CACTUAR)


Only the periods can be separated on different lines, so

CODE
$game_party.
gain_esper(ESPER::CACTUAR)


would be a valid call that passes one argument, whereas the first one passed none.

But ya, I would change the gain_esper function to accept a number that represents a particular esper in an array (ie: 1 is Cactuar, 2 is Bomb, etc).
I would probably even try to look for a way to make it so you just have to write "gain_esper(...)" rather than having to write "$game_party.gain_esper"

Though I'm not sure which looks better. Given the script box constraints, I would naturally go for the simplest function calls.

This post has been edited by Tsukihime: Nov 1 2011, 02:12 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Nof56
post Nov 1 2011, 09:23 PM
Post #5


Level 4
Group Icon

Group: Member
Posts: 47
Type: Developer
RM Skill: Beginner




So I tried what you did here
CODE
($game_party.
gain_esper(ESPER::CACTUAR)

And it now gives me this...
"Name Error occurred while running script. Uninitialized constant Interpreter::ESPER"
I don't actually know what the problem is here, but thanks for the help!


__________________________
S.P.O.R.D.<- Military acronym meaning Steaming Pile of Rectal Discharge.

Go to the top of the page
 
+Quote Post
   
Tsukihime
post Nov 2 2011, 07:13 PM
Post #6


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




Oh, it's ESPERS with the s at the end.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Nof56
post Nov 2 2011, 10:47 PM
Post #7


Level 4
Group Icon

Group: Member
Posts: 47
Type: Developer
RM Skill: Beginner




Dude! Thank you so much that solved the problem. THANK YOU!


__________________________
S.P.O.R.D.<- Military acronym meaning Steaming Pile of Rectal Discharge.

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 06:40 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker