SA-MP Forums Archive
[Ajuda] Erros. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erros. (/showthread.php?tid=267489)



[Ajuda] Erros. - Tymer - 08.07.2011

Aki Eu Estive A Ler PAWN, E Decidi Testar Os Meus Conhecimentos, Entгo Fiz Uma "Org" E Deu Os Seguintes Erros:
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(210) : error 017: undefined symbol "strtok"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(210) : error 033: array must be indexed (variable "tmp")
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(212) : error 017: undefined symbol "recrutado"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(212) : error 017: undefined symbol "ReturnUser"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(213) : error 017: undefined symbol "recrutado"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(213) : warning 215: expression has no effect
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(213) : error 001: expected token: ";", but found "]"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(213) : error 029: invalid expression, assumed zero
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(213) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


8 Errors.

Linhas:
Quote:

||210-|| tmp = strtok(cmdtext, idx);
||211-|| if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFFF, "Oi, Usa /Convidar ID! ^_^");
||212-|| recrutado = ReturnUser(tmp);
||213-|| if(IsPlayerConnected(recrutado) && Org[playerid] > 0)

Eu Nгo Consigo Resolvelos, Entгo Decidi Postar Para Mais Ajuda.


Re: [Ajuda] Erros. - Transferencia - 08.07.2011

Para corrigir o 1° erro,add isso no fim do gm:
pawn Код:
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Espere alguem ajudar nos outros ai,porque agora estou muito ocupado.


Re: [Ajuda] Erros. - Macintosh - 08.07.2011

Topo do GM

pawn Код:
new recrutado[MAX_PLAYERS];



Re: [Ajuda] Erros. - RockFire - 08.07.2011

PHP код:
recrutado ReturnUser(tmp); 
...

PHP код:
new recrutado



Re: [Ajuda] Erros. - Macintosh - 08.07.2011

Quote:
Originally Posted by feliperch
Посмотреть сообщение
PHP код:
recrutado ReturnUser(tmp); 
...

PHP код:
new recrutado
Nгo vi as linhas -.-*.


Re: [Ajuda] Erros. - Tymer - 08.07.2011

Vlw Por Toda A Ajuda, Agora Dб Estes Erros Aki:
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(211) : error 017: undefined symbol "strtok"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(211) : error 033: array must be indexed (variable "tmp")
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(212) : error 079: inconsistent return types (array & non-array)
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(213) : error 017: undefined symbol "ReturnUser"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(214) : error 017: undefined symbol "Org"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(214) : warning 215: expression has no effect
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(214) : error 001: expected token: ";", but found "]"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(214) : error 029: invalid expression, assumed zero
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(214) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


8 Errors.




Re: [Ajuda] Erros. - RockFire - 08.07.2011

http://pastebin.com/8rH8Vtft


Re: [Ajuda] Erros. - Ricop522 - 09.07.2011

1 - Nгo existe a variavel Org[MAX_PLAYERS];
2 - Coloque no topo do OnPlayerCommandText
new tmp [ 0x80 ];


Re: [Ajuda] Erros. - Tymer - 09.07.2011

Continua Dando Erros. ;(


Re: [Ajuda] Erros. - BlueRider - 09.07.2011

Й o que faz estar a usar sistemas avanзados sem conhecimento (jб avisei no outro tуpico).
Desculpe, mas sem o sistema nгo podemos adivinhar o erro.