getplayermoney < "variable"
#1

pawn Код:
CMD:deposit(playerid, params[])
{
    new money;
    if(sscanf(params, "d", money)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /deposit [money]");
    if(GetPlayerMoney(playerid) < money)); {
    SendClientMessage(playerid, 0xFF0000FF, "ERROR: You have not enough money on your pocket to put in your bank!");
    }
    PlayerInfo[playerid][pBankmoney] += money;
    GivePlayerMoney(playerid, -money);
    return 1;
}
Errors:
Код:
C:\Documents and Settings\eros\Desktop\SAMP Server\filterscripts\afs.pwn(1225) : error 029: invalid expression, assumed zero
C:\Documents and Settings\eros\Desktop\SAMP Server\filterscripts\afs.pwn(1225) : warning 215: expression has no effect
NOTE: Not whole script yet.
Reply
#2

If-statements are never followed by a semicolon. You also have an extra closing bracket.
Reply
#3

Thanks for replying. Now new code:
pawn Код:
if(GetPlayerMoney(playerid) < money)) SendClientMessage(playerid, 0xFF0000FF, "ERROR: You have not enough money on your pocket to put in your bank!");
New error:
Код:
C:\Documents and Settings\eros\Desktop\SAMP Server\filterscripts\afs.pwn(1225) : error 029: invalid expression, assumed zero
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
You also have an extra closing bracket.
4char
Reply
#5

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
4char
I have removed it already.
Reply
#6

no you didnt. there are 2 opening brackets ( ( ) and 3 closing brackets ( ) )
if(GetPlayerMoney(playerid) < money))
Reply
#7

oh okay. didn't notice that looool. I thought this " { " bracket.

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)