25.09.2010, 22:00
Okay a friend helped me to do /afine but i got an error can some one help me:
Line 32510 :
Code:
Код:
C:\Documents and Settings\Karl\Desktop\gm Versions\v3.3\VFCRPv3.3.pwn(32510) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
else
Код:
//--------[afine]------------------------------------------- if(strcmp(cmd, "/afine", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pAdmin] == 1) { SendClientMessage(playerid, COLOR_GREY, "You are not a level 2 admin!"); return 1; } else { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /afine [playerid/PartOfName] [price] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /afine [playerid/PartOfName] [price] [reason]"); return 1; } moneys = strval(tmp); if(moneys < 1) { SendClientMessage(playerid, COLOR_GREY, "Fine Money can't be below 1!"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /afine [playerid/PartOfName] [price] [reason]"); return 1; } format(string, sizeof(string), "* You gave %s a Fine for $%d and the reason of: %s", giveplayer, moneys, (result)); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Admin %s has Fined you for $%d. Reason: %s", sendername, moneys, (result)); SendClientMessage(giveplayerid, COLOR_WHITE, string); GivePlayerMoney(giveplayerid, -moneys); //CHANGE THIS LINE IF YOUR USING AN ANTICHEAT return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, "Invalid ID"); return 1; } } return 1; }