27.06.2009, 11:42
Hi, i have some problems with my /kill command. I cannot compile because of some errors.
And this is the script :
What is wrong ?
Код:
C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8137) : warning 217: loose indentation C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8137) : error 029: invalid expression, assumed zero C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8138) : error 001: expected token: ";", but found "{" C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8141) : error 017: undefined symbol "jailed2" C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8141) : warning 215: expression has no effect C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8141) : error 001: expected token: ";", but found "]" C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8141) : error 029: invalid expression, assumed zero C:\Users\****\Documents\USB\Mods\samp02Xserver.win32\gamemodes\gf.pwn(8141) : fatal error 107: too many error messages on one line
Код:
public OnPlayerCommandText(playerid, cmdtext) { if(strcmp(cmdtext, "/kill", true) == 0) { if (jailed2[playerid] == 1) { SendClientMessage(playerid,COLOR_GRAD1,"You cannot kill yourself because you're in the jail."); } else { SetPlayerHealth(playerid, 0.0); GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),".: %s Has killed himself (/kill) :.",playername); SendClientMessageToAll(COLOR_RED,string); } return 1; } return 0; }