Help - Search - Members - Calendar
Full Version: Help with Esper/Junction problem.
RPG RPG Revolution Forums > Scripting > Script Development and Support
Nof56
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!
Tsukihime
How are you calling the script.
Nof56
I call the script using "$game_party.gain_esper (ESPER::CACTUAR)" using the Esper Cactuar, but for some reason it cannot call just one.
Tsukihime
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.
Nof56
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!
Tsukihime
Oh, it's ESPERS with the s at the end.
Nof56
Dude! Thank you so much that solved the problem. THANK YOU!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.