Help - Search - Members - Calendar
Full Version: [Solved] Issue with Custom Shop system
RPG RPG Revolution Forums > Scripting > Script Development and Support
Eden
So I got this custom shop script off another site, and the instructions say to call a certain script before openning a shop.

However, when I call the preperation script, it shows this error message:

"NoMethodError occurred while running script.

undefined method 'gold_type=' for #<Game_Temp:0x80db350>"

Here's the pre-script.

CODE
$game_temp.type = 1
$game_temp.buy_discount = 1.2
$game_temp.sell_discount = 0.8
$game_temp.gold_type = :gold


I tried changing this part around
CODE
$game_temp.gold_type = :gold


but it just kept displaying error messages.

I tried starting a new project and using the script there, but it still didn't work, so it's not a compatibility issue.
Please help?
ForeverZer0
A link to the script would be great. Kinda hard to tell what its supposed to be unless you are familiar with the script.

From the looks of it, the word gold should not have a colon in front of it, but that is not THE problem. Even if fix the original error, that will still cause a syntax error since gold is undefined.
Eden
(Oh, hey, I use your blacksmith script...)

http://forum.chaos-project.com/index.php?topic=7752.0

Thats the link to the script.
ForeverZer0
Meh, that script is a complete mess. Using symbols (i.e. :word) is not very user-friendly, especially when mixed with lamda syntax (i.e. :word => value).

At a quick look, the reason is there is no variable name "gold_type" in Game_Temp. It is an error by the author, nothing you are doing wrong. Since the demo was posted at MegaUpload, I can't really see what he was doing with it.

Have you tried simply omitting that line from the script call? It doesn't appear that it makes any difference, though I haven't tested it.
Eden
That worked, Sweet.

Maybe someone should tell the author...

Thanks.
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.