13.04.2012, 15:48
I Get these errors:
with this command:
Код:
C:\Users\Jampie\Desktop\pcash test\gamemodes\grandlarc.pwn(53) : error 029: invalid expression, assumed zero C:\Users\Jampie\Desktop\pcash test\gamemodes\grandlarc.pwn(53) : warning 215: expression has no effect C:\Users\Jampie\Desktop\pcash test\gamemodes\grandlarc.pwn(53) : error 001: expected token: ";", but found ")" C:\Users\Jampie\Desktop\pcash test\gamemodes\grandlarc.pwn(53) : error 029: invalid expression, assumed zero C:\Users\Jampie\Desktop\pcash test\gamemodes\grandlarc.pwn(53) : fatal error 107: too many error messages on one line
Код:
new cmd[256], idx; cmd = strtok(cmdtext, idx); if(strcmp("/GiveJCash", cmd, true) == 0) { new tmp[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, red, "You did not give an ID or ammount"); if(strval(tmp) == playerid) return SendClientMessage(playerid, red, "You can not give yourself PCash"); if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, red, "That player is not connected"); new tmp2[256]; tmp2 = strtok(cmdtext, idx); if(!strlen(tmp2)) return SendClientMessage(playerid, red, "You did not give an ammount"); new player = strval(tmp); new ammount = strval(tmp2); if(GetPlayerPCash(playerid) < ammount) return SendClientMessage(playerid, red, "You do not have enough PCash"); new pname[MAX_PLAYER_NAME]; GetPlayerName(player, pname, sizeof(pname)); new oname[MAX_PLAYER_NAME]; GetPlayerName(playerid, oname, sizeof(oname)); new string[256]; format(string, sizeof(string), "You have given %s %d PCash", pname, ammount); SendClientMessage(playerid, green, string); format(string, sizeof(string), "You have been given %d PCash by %s", ammount, oname); SendClientMessage(player, green, string); GivePlayerPCash(player, ammount); GivePlayerPCash(playerid, -ammount); return 1; }