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
> [Solved] Issue with Custom Shop system
Eden
post Jan 22 2012, 07:24 PM
Post #1


Lv. 87 Nihilist
Group Icon

Group: Revolutionary
Posts: 115
Type: Mapper
RM Skill: Advanced




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?

This post has been edited by Eden: Jan 22 2012, 10:27 PM


__________________________




R3's Resident Nihilist
Go to the top of the page
 
+Quote Post
   
ForeverZer0
post Jan 22 2012, 08:01 PM
Post #2


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Masterful




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.
Go to the top of the page
 
+Quote Post
   
Eden
post Jan 22 2012, 09:03 PM
Post #3


Lv. 87 Nihilist
Group Icon

Group: Revolutionary
Posts: 115
Type: Mapper
RM Skill: Advanced




(Oh, hey, I use your blacksmith script...)

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

Thats the link to the script.


__________________________




R3's Resident Nihilist
Go to the top of the page
 
+Quote Post
   
ForeverZer0
post Jan 22 2012, 10:02 PM
Post #4


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Masterful




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.
Go to the top of the page
 
+Quote Post
   
Eden
post Jan 22 2012, 10:26 PM
Post #5


Lv. 87 Nihilist
Group Icon

Group: Revolutionary
Posts: 115
Type: Mapper
RM Skill: Advanced




That worked, Sweet.

Maybe someone should tell the author...

Thanks.


__________________________




R3's Resident Nihilist
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: 26th May 2013 - 01:43 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker