here's the code I use
Heres my error message:
Nomethoderror occured. undefined method 'gold=' for #<Game_Party:0x13c0a50>
By some reason, rpg maker reads .gold as a method when in fact, it's a variable, or an attribute or whatever.
$game_party.gain_gold(value)
Just make value -100 and you'll be golden ;)
Thank's a lot. Levels up. I'm making a better debug script :haha:.
Good thing I discovered how great this site really is.
We're here for you! :-*
just to let you know..
rmxp uses
$game_party.gold to request the current gold to use in something else (calls its up but can't change)
$game_party.lose_gold(amount) to remove gold
$game_party.gain_gold(amount) to add gold
know its kinda late but anyway :P
That's helpfull, gives you a level up too :)
And last but not least, if you put [RESOLVED] in the title of this thread, that'll prevent you from being eaten alive by a moderator... such as Aqua... she eats people alive. BASED ON A TRUE STORY may have eaten lunch money and not an actual person
To do it like this
You need to change the gold attribute to accessor so its not reader. You can do it the above way with this small snippet.
class Game_Party
attr_accessor :gold
end
Its useless but thats why it wasn't working before.