04.06.2009, 21:07
now my command looks like that:
but i still got errors:
all warnings and errors are on this line:
If it's important - my gm is made from sftdm!
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext"/buylevel", true) == 0; { gPlayerMoney[playerid] = GetPlayerMoney(playerid); if (GetPlayerMoney(playerid) >= 250000) { gPlayerLevel[playerid] += 1; SetPlayerMoney(playerid, gPlayerMoney[playerid] - 250000); } return 1; } if (strcmp(cmdtext"/flip", true) == 0) { if (gPlayerLevel[playerid] > 1) { SendClientMessage(playerid, 0xFFFFFFFF, "I just... flipped?"); return 1; } else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not high enough level to use this!"); } }
Код:
C:\Documents and Settings\Install\Desktop\HOSTS\gamemodes\xlight.pwn(1127) : error 001: expected token: ",", but found "-string-" C:\Documents and Settings\Install\Desktop\HOSTS\gamemodes\xlight.pwn(1127) : warning 215: expression has no effect C:\Documents and Settings\Install\Desktop\HOSTS\gamemodes\xlight.pwn(1127) : warning 215: expression has no effect C:\Documents and Settings\Install\Desktop\HOSTS\gamemodes\xlight.pwn(1127) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Install\Desktop\HOSTS\gamemodes\xlight.pwn(1127) : error 029: invalid expression, assumed zero C:\Documents and Settings\Install\Desktop\HOSTS\gamemodes\xlight.pwn(1127) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
if (strcmp(cmdtext"/buylevel", true) == 0;