money stat in Developer Help
|
|
ok i know this must sound kinda stupid but how can i get money stat to show (G:5,S:60,C:99) and i know the coding is wrong but this is what i got in mob/
statpanel("money") stat("money", ) stat("Gold",G) stat("Silver",S) stat("Copper",C)
var/ G = 5 S = 60 C = 99 proc/Money() if(usr.C > 99) usr.S += 1 usr.C -= 100 if(usr.S > 99) usr.G += 1 usr.S -=100
|
everything works fine except i cant get the variables of G,S and C under a money tab example:
var/money G = 5 S = 60 C = 99
|
any help would be great.
|
Also, you shouldn't use usr in a process, it leads to very unusual bugs. Assuming that Money() is defined under the same type that has the money variables, you should be able to use src there.