[Ajuda] Erros.
#1

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.
Reply
#2

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.
Reply
#3

Topo do GM

pawn Код:
new recrutado[MAX_PLAYERS];
Reply
#4

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

PHP код:
new recrutado
Reply
#5

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

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

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.

Reply
#7

http://pastebin.com/8rH8Vtft
Reply
#8

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

Continua Dando Erros. ;(
Reply
#10

Й 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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)