22.05.2011, 13:11
boas eu fiz um comando de /prender esta aqui
dame este erro
Linha 12468
PHP код:
if(strcmp(cmd, "/prender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3,playerid,197.8656,179.2276,1003.0299)
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "USA: /prender [JogadorID/Nome] [tempo(minutos)] [Motivo]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 2)
{
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[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_RED, "USA: /prender [JogadorID/Nome] [tempo(minutos)] [Motivo:]");
return 1;
}
format(string, sizeof(string), "* Vocк estб preso %s.", giveplayer);
SendClientMessage(playerid, COLOR_BLUE, string);
format(string, sizeof(string), "* Vocк foi preso pelo %s.", sendername);
SendClientMessage(playa, COLOR_BLUE, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;
SetPlayerPos(playa, 197.7448,174.9779,1003.0234);
format(string, sizeof(string), "Estб preso por %d minutos. Cauзгo: Nгo й Possнvel", money);
SendClientMessage(playa, COLOR_BLUE, string);
format(string, 256, "%s foi preso por %s [Motivo: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_BLUE,string);
format(string, sizeof(string), "%s preso por %s [Motivo: %s]", giveplayer, sendername, (result));
printf("%s",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, " Vocк nгo estб autorizado a utilizar este comando!");
}
}
return 1;
}
Quote:
C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(3360) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(3617) : warning 204: symbol is assigned a value that is never used: "cut" C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(1246 : error 001: expected token: ")", but found "-identifier-" C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(43959) : warning 219: local variable "alarme" shadows a variable at a preceding level C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(43959) : warning 219: local variable "portas" shadows a variable at a preceding level C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(43959) : warning 219: local variable "capo" shadows a variable at a preceding level C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(43959) : warning 219: local variable "portamalas" shadows a variable at a preceding level C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(43983) : warning 203: symbol is never used: "SetWorld" C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(42170) : warning 204: symbol is assigned a value that is never used: "roadblocktimer" C:\Users\Ricardo Moreira\Desktop\RedContry\RP-NossaComunidade 0.3c.1\gamemodes\RP-NossaComunidade.pwn(10113) : warning 204: symbol is assigned a value that is never used: "tugate" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
PHP код:
tmp = strtok(cmdtext, idx);