08.03.2012, 16:37
i have this cmd for /jail
and when i compile that i have this erors
Код:
if(strcmp(cmd, "/jail", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /jail [playerid/PartOfName] [time(minutes)] [reason]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 1 ) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; 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: /jail [playerid/PartOfName] [time(minutes)] [reason]"); return 1; } format(string, sizeof(string), "* ("COL_RED"Puma RPG Macedonia{FFFFFF}!) Go zatvorivte "COL_RED"%s.", giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* ("COLOR_RED"Puma RPG Macedonia{FFFFFF}!) "COL_RED"%s {FFFFFF}Ve zatvori vo zatvor | Razlog: "COL_RED"%s", sendername, (result)); SendClientMessage(playa, COLOR_WHITE, string); SafeResetPlayerWeapons(playa); WantedPoints[playa] = 0; PlayerInfo[playa][pJailed] = 1; PlayerInfo[playa][pJailTime] = money*60; SetPlayerInterior(playa, 0); PlayerInfo[playa][pInt] = 0; new rand = random(sizeof(gRandomJailSpawns)); SetPlayerPos(playa, gRandomJailSpawns[rand][0], gRandomJailSpawns[rand][1], gRandomJailSpawns[rand][2]); format(string, sizeof(string), "Zatvoren si "COL_RED"%d {FFFFFF}minuti. Jamcevina: "COL_RED"Nedostupna", money); SendClientMessage(playa, COLOR_WHITE, string); format(string, 256, "AdmCmd: %s e zatvoren %d minuti od Admin %s Pricina: %s", giveplayer,money, sendername, result); BroadCast(COLOR_LIGHTRED,string); format(string, sizeof(string), "AdmCmd: %s e zatvoren %d minuti od Admin %s Pricina: %s", giveplayer,money, sendername, result); printf("%s",string); } } } else { SendClientMessage(playerid, COLOR_RED, " Ne si admin pa da ja koristis komandata!"); } } return 1; }
Код:
C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(8434) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(10111) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(10219) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(10247) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(10295) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(10325) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(10360) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(11877) : warning 202: number of arguments does not match definition C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(11877) : warning 202: number of arguments does not match definition C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(11877) : warning 202: number of arguments does not match definition C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(11877) : warning 202: number of arguments does not match definition C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(16767) : warning 217: loose indentation C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(16808) : error 001: expected token: "-string end-", but found "-identifier-" C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(16808) : error 017: undefined symbol "COL_RED" C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(16808) : warning 215: expression has no effect C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(16808) : error 001: expected token: ";", but found "-identifier-" C:\Documents and Settings\ws\Desktop\Gamez\gm\pumarpg\pumarpg\gamemodes\DREAMWORLD.pwn(16808) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.