[AJUDA]ERRO /prender
#1

boas eu fiz um comando de /prender esta aqui

PHP код:
    if(strcmp(cmd"/prender"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerToPoint(3,playerid,197.8656,179.2276,1003.0299)
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_RED"USA: /prender [JogadorID/Nome] [tempo(minutos)] [Motivo]");
                return 
1;
            }
            new 
playa;
            new 
money;
            
playa ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
money strval(tmp);
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
            {
                if(
IsPlayerConnected(playa))
                {
                    if(
playa != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(playagiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(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(playeridCOLOR_RED"USA: /prender [JogadorID/Nome] [tempo(minutos)] [Motivo:]");
                            return 
1;
                        }
                        
format(stringsizeof(string), "* Vocк estб preso %s."giveplayer);
                        
SendClientMessage(playeridCOLOR_BLUEstring);
                        
format(stringsizeof(string), "* Vocк foi preso pelo %s."sendername);
                        
SendClientMessage(playaCOLOR_BLUEstring);
                        
SafeResetPlayerWeapons(playa);
                        
WantedPoints[playa] = 0;
                        
PlayerInfo[playa][pJailed] = 1;
                        
PlayerInfo[playa][pJailTime] = money*60;
                        
SetPlayerInterior(playa6);
                        
PlayerInfo[playa][pInt] = 6;
                        
SetPlayerPos(playa197.7448,174.9779,1003.0234);
                        
format(stringsizeof(string), "Estб preso por %d minutos. Cauзгo: Nгo й Possнvel"money);
                        
SendClientMessage(playaCOLOR_BLUEstring);
                        
format(string256"%s foi preso por %s [Motivo: %s]"giveplayersendername, (result));
                        
BroadCast(COLOR_BLUE,string);
                        
format(stringsizeof(string), "%s preso por %s [Motivo: %s]"giveplayersendername, (result));
                        
printf("%s",string);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"  Vocк nгo estб autorizado a utilizar este comando!");
            }
        }
        return 
1;
    } 
dame este erro

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.

Linha 12468
PHP код:
tmp strtok(cmdtextidx); 
Reply
#2

Mande todas as linhas que estiverem com erro.

Quanto а linha 12468, veja se nгo tem nenhum paratenses faltando na linha acima (12467).
Reply
#3

so tem um erro :S veja

Linha 12468
PHP код:
tmp strtok(cmdtextidx); 
Linha 12467 <-- ta aki a linha que vce disse pa ver
PHP код:
if (PlayerToPoint(3,playerid,197.8656,179.2276,1003.0299
Reply
#4

PHP код:
if (PlayerToPoint(3,playerid,197.8656,179.2276,1003.0299)) 
Falta um parenteses nessa linha.
Reply
#5

Quote:
Originally Posted by [Dk]TuReTOo
Посмотреть сообщение
so tem um erro :S veja

Linha 12468
PHP код:
tmp strtok(cmdtextidx); 
Linha 12467 <-- ta aki a linha que vce disse pa ver
PHP код:
if (PlayerToPoint(3,playerid,197.8656,179.2276,1003.0299
Retire:
PHP код:
tmp strtokcmdtextidx ); /* Retire isto */ 
Sobre o PlayerToPoint, isto estб correto(o que vou postar):
PHP код:
if( PlayerToPoint3playerid197.8656179.22761003.0299 ) ) 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)