C:\Users\Shum\Desktop\twm.pwn(42) : error 017: undefined symbol "playerid" C:\Users\Shum\Desktop\twm.pwn(166) : error 001: expected token: ")", but found "{" C:\Users\Shum\Desktop\twm.pwn(174) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(179) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(184) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(189) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(194) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(199) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(204) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(209) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(215) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(215) : error 029: invalid expression, assumed zero C:\Users\Shum\Desktop\twm.pwn(215) : warning 215: expression has no effect C:\Users\Shum\Desktop\twm.pwn(215) : error 001: expected token: ";", but found "if" C:\Users\Shum\Desktop\twm.pwn(215) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 14 Errors.
new medkit[playerid] = 0;
/*Linha 42
Erro: Undefined symbol "playerid"*/
GetPlayerName(playerid, gPlayerName[playerid], MAX_PLAYER_NAME);
if(fexist(GetINI(playerid))
{ //Linha 166
ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_INPUT, "Login", "Digite sua senha abaixo para logar-se", "Logar", "Sair");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Digite sua senha abaixo para registrar-se", "Registrar", "Sair");
}
//Linha 174 atй 215
new string[256];
if(classid == 0)
{
format(string, sizeof(string), "%s se conectou como Recon no Time Delta", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 1)
{
format(string, sizeof(string), "%s se conectou como Recon no Time Alpha", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 2)
{
format(string, sizeof(string), "%s se conectou como Assault no Time Alpha", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 3)
{
format(string, sizeof(string), "%s se conectou como Assault no Time Delta", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 4)
{
format(string, sizeof(string), "%s se conectou como Engenheiro no Time Alpha", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 5)
{
format(string, sizeof(string), "%s se conectou como Engenheiro no Time Delta", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 6)
{
format(string, sizeof(string), "%s se conectou como Suporte no Time Alpha", playerid);
SendClientMessageToAll(vermelho, string);
}
else if(classid == 7)
{
format(string, sizeof(string), "%s se conectou como Suporte no Time Delta", playerid);
SendClientMessageToAll(vermelho, string);
}
if(classid == 0) || if(classid == 1)
{
SendClientMessage(playerid, azulclaro, "Seja bem vindo %s, caso queira trocar de classe, aperte F4 e digite /kill", playerid);
SendClientMessage(playerid, verde, "Pontos com a classe Recon: %d", PontosRecon);
}
else if(classid == 2) || if(classid == 3)
{
SendClientMessage(playerid, azulclaro, "Seja bem vindo %s, caso queira trocar de classe, aperte F4 e digite /kill", playerid);
SendClientMessage(playerid, verde, "Pontos com a classe Assault: %d", PontosAssault);
if(PontosAssault < 30)
{
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: Desert Eagle (30 Kills)");
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: MP5 - Secundбria (50 Kills)");
}
if(PontosAssault >= 30)
{
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: MP5 - Secundбria (50 Kills)");
}
if(PontosAssault >= 30)
{
SendClientMessage(playerid, vermelho, "A arma Desert Eagle estб disponнvel para desbloqueio!");
SendClientMessage(playerid, vermelho, "Digite /eagledesbloquear para pegб-la");
}
if(PontosAssault >= 50)
{
SendClientMessage(playerid, vermelho, "Parabйns! Vocк alcanзou o patamar mбximo da classe Assault! Podendo assim liberar a MP5");
SendClientMessage(playerid, vermelho, "Digite /mp5desbloquear para pegб-la");
}
}
else if(classid == 4) || if(classid == 5)
{
SendClientMessage(playerid, azulclaro, "Seja bem vindo %s, caso queira trocar de classe, aperte F4 e digite /kill", playerid);
SendClientMessage(playerid, verde, "Pontos com a classe Engenheiro: %d", PontosEngenheiro);
if(PontosEngenheiro < 15)
{
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: C4 (15 Kills)");
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquar: Combat Shotgun (30 Kills)");
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: Sawn-off Shotgun (70 Kills)");
}
if(PontosEngenheiro >= 15)
{
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquar: Combat Shotgun (30 Kills)");
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: Sawn-off Shotgun (70 Kills)");
}
if(PontosEngenheiro >= 30)
{
SendClientMessage(playerid, vermelho, "Equipamentos a desbloquear: Sawn-off Shotgun (70 Kills)");
}
if(PontosEngenheiro >= 70)
{
SendClientMessage(playerid, vermelho, "Parabйns! Vocк alcanзou o patamar mбximo da classe de Engenheiro!");
SendClientMessage(playerid, vermelho, "Desbloqueando a Sawn-off Shotgun! /sawnoffdesbloquear para pegб-la!");
}
}
pawn Код:
|
pawn Код:
|
pawn Код:
|
new medkit[playerid] = 0;
new medkit[MAX_PLAYERS] = 0;
C:\Users\Shum\Desktop\twm.pwn(165) : error 017: undefined symbol "DIALOG_LOGAR" C:\Users\Shum\Desktop\twm.pwn(169) : error 017: undefined symbol "DIALOG_REGISTRO" C:\Users\Shum\Desktop\twm.pwn(172) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(177) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(182) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(187) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(192) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(197) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(202) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(207) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(213) : error 017: undefined symbol "classid" C:\Users\Shum\Desktop\twm.pwn(213) : error 029: invalid expression, assumed zero C:\Users\Shum\Desktop\twm.pwn(213) : warning 215: expression has no effect C:\Users\Shum\Desktop\twm.pwn(213) : error 001: expected token: ";", but found "if" C:\Users\Shum\Desktop\twm.pwn(213) : fatal error 107: too many error messages on one line
#define DIALOG_LOGAR 1
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2074.3289,1924.5944,14.3246);
SetPlayerCameraPos(playerid, 2078.3647,1923.4133,13.3281);
SetPlayerCameraLookAt(playerid, 2074.3289,1924.5944,14.3246);
SetPlayerFacingAngle(playerid, 252.4539);
if((classid >= 0) && (classid <= 2))
{
gTeam[playerid] = Aztecas;
GameTextForPlayer(playerid,"~n~~n~~n~~b~Aztecas",4000,5);
}
if((classid >= 3) && (classid <= 5))
{
gTeam[playerid] = Grove;
GameTextForPlayer(playerid,"~n~~n~~n~~g~Grove",4000,5);
}
if((classid >= 6) && (classid <= 8))
{
gTeam[playerid] = Ballas;
GameTextForPlayer(playerid,"~n~~n~~n~~g~Ballas",4000,5);
}
return 1;
}
Mas como fazer com que o classid exista? |
AddPlayerClassEx(1, [...]); //classid = 0
AddPlayerClassEx(1, [...]); //classid = 1
Eu ainda nгo fiz as classes, serб por isso?
Como й feito a numeraзгo das classes? pawn Код:
E sim, defini o valor das dialogs |