05.04.2011, 21:08
when i put commands /ooc (/o) and /getcar i have 7 errors
cmds:
errors:
cmds:
Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " Nisi se jos logirao !"); return 1; } if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !"); return 1; } 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: (/o)oc [ooc chat]"); return 1; } format(string, sizeof(string), "(( %s: %s ))", sendername, result); OOCOff(COLOR_OOC,string); printf("%s", string); } return 1; } if(strcmp(cmd, "/getcar", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /getcar [carid]"); return 1; } new Float:plocx,Float:plocy,Float:plocz; new plo; plo = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 3) { GetPlayerPos(playerid, plocx, plocy, plocz); SetVehiclePos(plo,plocx,plocy+4, plocz); } else { SendClientMessage(playerid, COLOR_GRAD1, " [{F81414}CroAS{C3C3C3}] Admini samo!!!"); } } return 1; }
Код:
C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1755) : warning 217: loose indentation C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1764) : warning 217: loose indentation C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1764) : error 017: undefined symbol "noooc" C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1769) : error 017: undefined symbol "pMuted" C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1771) : error 017: undefined symbol "TEAM_CYAN_COLOR" C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1774) : error 017: undefined symbol "sendername" C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1774) : error 017: undefined symbol "sendername" C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1774) : error 029: invalid expression, assumed zero C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(1774) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.