Jump to content

can someone tell me how to fix this


Guest PaperClip20

Recommended Posts

if ($3 == !buybeer) {

if ($mta.area($1,$2) == Mansion) {

if ($4 != $null) {

if ($calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) < $readini(RPG2.ini,beercost,beercost)) {

mta.msg $1 $2 Not enough money

}

else {

!writeini -n $+("RPG2.ini") Cash $mta.name($1,$2) $calc($readini(RPG2.ini,Cash,$mta.name($1,$2)) - $readini(RPG2.ini,beercost,beercost)))}

!writeini -n $+("RPG2.ini") beeramount $mta.name($1,$2) $calc($readini(RPG2.ini,beeramount,$mta.name($1,$2))+$4))}

mta.msg $1 $2 $mta.name($1,$2) 's current balance is $ $calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) dollar(s), and he/she currently has $readini(RPG2.ini,beeramount,$mta.name($1,$2)) beer(s).

}

}

else {

mta.msg $1 $2 Error, !buysec

}

}

else {

mta.msg $1 $2 You must be in Mansion }

}

ok what i want to fix is

when i type !buybeer 3 i want it to take out how much 3 beers cost

out of me cash

and if i dont have the money for 3 beers i want it to tell me that i dont have the cash for them

ty guys

Link to comment
  • 2 weeks later...

if ($3 == !buybeer) {

if ($mta.area($1,$2) == Mansion) {

if ($4 != $null) {

if ($calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) < $readini(RPG2.ini,beercost,beercost)) {

mta.msg $1 $2 Not enough money

}

else {

!writeini -n $+("RPG2.ini") Cash $mta.name($1,$2) $calc($readini(RPG2.ini,Cash,$mta.name($1,$2)) - $readini(RPG2.ini,beercost,beercost)))}

!writeini -n $+("RPG2.ini") beeramount $mta.name($1,$2) $calc($readini(RPG2.ini,beeramount,$mta.name($1,$2))+$4))}

mta.msg $1 $2 $mta.name($1,$2) 's current balance is $ $calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) dollar(s), and he/she currently has $readini(RPG2.ini,beeramount,$mta.name($1,$2)) beer(s).

}

}

else {

mta.msg $1 $2 Error, !buysec

}

else {

mta.msg $1 $2 You must be in Mansion }

? :]

Link to comment

if ($3 == !buybeer) {
 if ($mta.area($1,$2) == Mansion) {
   if ($4 != $null) {
     if ($calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) < $readini(RPG2.ini,beercost,beercost) * $4) {
       mta.msg $1 $2 Not enough money
     }
     else {
       !writeini -n $+("RPG2.ini") Cash $mta.name($1,$2) $calc($readini(RPG2.ini,Cash,$mta.name($1,$2)) - $readini(RPG2.ini,beercost,beercost) * $4))}
       !writeini -n $+("RPG2.ini") beeramount $mta.name($1,$2) $calc($readini(RPG2.ini,beeramount,$mta.name($1,$2)) + $4))}
       mta.msg $1 $2 $mta.name($1,$2) 's current balance is $ $calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) dollar(s), and he/she currently has $readini(RPG2.ini,beeramount,$mta.name($1,$2)) beer(s).
     }
   }
   else {
     mta.msg $1 $2 Error, !buybeer 
   }
 }
 else {
   mta.msg $1 $2 You must be in Mansion 
 }
}

Try that :idea:

Edited by Guest
Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...