Guest Posted June 17, 2006 Share Posted June 17, 2006 can somebody fix this from going negative i've searched on it but others do not work alias rpg.give { var %a = $iif($4 == $null,$2,$iif($mta.name($1,$4) != Unknown,$4,$mta.getid($1,$4))) if %a != -1 && %a != $2 { if (($5) && ($5 isnum) && ($5 > 0)) { if ($readini(rpg.ini,$mta.name($1,$2),cash) >= $5) { mta.say $1 $mta.name($1,$2) gave $chr(36) $+ $5 to $mta.name($1,%a) !writeini -n "rpg.ini" $mta.name($1,%a) cash $calc($rpg.cash($1,%a) + $5) !writeini -n "rpg.ini" $mta.name($1,$2) cash $calc($rpg.cash($1,$2) - $5) } else mta.msg $1 $2 Error - You have not enough cash! } else mta.say $1 Syntax: !give } else mta.msg $1 $2 Cannot give urself/invalid person money } Link to comment
MrJax Posted June 17, 2006 Share Posted June 17, 2006 I don't see how it can go negative, you're checking the number they give and the ammount they already have. Link to comment
Guest Posted June 18, 2006 Share Posted June 18, 2006 It just keeps saying You Don't havwe enough cash? EDIT: nvm i got it thxs Link to comment
Recommended Posts