[Ajuda] Erros em variбveis
#1

Alguem pode me ajudar com esse erro?


C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(16 73) : error 001: expected token: ";", but found "new"
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(16 74) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(16 87) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Linha:

new string[50+MAX_PLAYER_NAME];
new Nome[40][MAX_PLAYERS];
new Nomi[40][MAX_PLAYERS];
Reply
#2

pawn Code:
new string[50][MAX_PLAYER_NAME];
Reply
#3

pawn Code:
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(102) : error 020: invalid symbol name ""
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(1674) : error 001: expected token: ";", but found "new"
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(1675) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(1688) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(2944) : warning 203: symbol is never used: ""
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#4

pawn Code:
new string[50+MAX_PLAYER_NAME];
    new Nome[40][MAX_PLAYERS];
    new Nomi[40][MAX_PLAYERS];

    TaNoX1[playerid] = false;
    TaNoX1[killerid] = false;

    GetPlayerName(killerid, Nomi[killerid], 40);
    GetPlayerName(playerid, Nome[playerid], 40);

    format(string, sizeof(string),"[GSF-[X1]] %s Derrotou no x1 Contra %s.",Nomi[killerid], Nome[killerid]);
    SendClientMessageToAll(Branco, string);
    Quantos = 0;
}
alguem me ajuda?
Reply
#5

Tenta assim...
PHP Code:
new NickPlayer[2];

TaNoX1[playerid] = false;
TaNoX1[killerid] = false;

GetPlayerName(killeridNickPlayer[0], 40);
GetPlayerName(playeridNickPlayer[1], 40);

format(stringsizeof(string),"[GSF-[X1]] %s Derrotou no x1 Contra %s."NickPlayer[0], NickPlayer[1]);
SendClientMessageToAll(Brancostring);
Quantos 0
Reply
#6

agora deu esse erro
pawn Code:
C:\Users\Carlos\Desktop\Server\gamemodes\GM.pwn(1849) : error 001: expected token: ";", but found "new"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#7

Manda a linha 1849.
Reply
#8

pawn Code:
new NickPlayer[2];
Reply
#9

Manda linhas antes...
Reply
#10

pawn Code:
if(TaNoX1[playerid] == true)
{
    OnPlayerSpawn(playerid);
    OnPlayerSpawn(killerid)


//new pName[MAX_PLAYER_NAME];
//    new string[50+MAX_PLAYER_NAME];

new NickPlayer[2];

TaNoX1[playerid] = false;
TaNoX1[killerid] = false;

GetPlayerName(killerid, NickPlayer[0], 40);
GetPlayerName(playerid, NickPlayer[1], 40);

format(string, sizeof(string),"[GSF-[X1]] %s Derrotou no x1 Contra %s.", NickPlayer[0], NickPlayer[1]);
SendClientMessageToAll(Branco, string);
Quantos = 0;
}
       
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)