[Ajuda] 3 Warnings. Fбcil.
#1

Olб, Tenho 3 Warnings Em Meu GM, Que Nгo Consiguo Tirar!

Warnings:
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(431) : warning 213: tag mismatch
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(431) : warning 213: tag mismatch
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(431) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.

Linha:
Quote:

GetPlayerPos(playerid, oldposx, oldposy, oldposz);

Ajuda, PF.

Vlw.
Reply
#2

OMG porque й que vocй criou um novo topico enquanto tem o outro aberto??1 topico ja da para voce arranjar o seu gamemode, mas ja agora meta ai o seu GM com as modificaзхes ja feitas...
Reply
#3

ou...

pawn Код:
new Float: oldposx,oldposy,oldposz;
Reply
#4

Shickcard, da sua maneira nгo daria certo eu imagino, por que a virgula anula o Float.
Faзa o teste ai =)

Tymer, faзa como o The Knight falou
Reply
#5

Baah, asho que me confundi.
No pascal quando definimos uma variavel nгo й new e sim var.

PHP код:
var x1,x2:Real; // Exemplo. 
Mais eu nгo sei se essas virgulas anulam a funзгo nгo D:
Reply
#6

Tentei. Olhe O Que Apareceu:
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(431) : warning 219: local variable "oldposx" shadows a variable at a preceding level
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(431) : warning 219: local variable "oldposy" shadows a variable at a preceding level
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(431) : warning 219: local variable "oldposz" shadows a variable at a preceding level
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(506) : warning 203: symbol is never used: "oldposx"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(506) : warning 203: symbol is never used: "oldposy"
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(506) : warning 203: symbol is never used: "oldposz"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.

Reply
#7

PHP код:
#include <a_samp>
#include <dini>
new oldposx;
new 
oldposy;
new 
oldposz;
new 
cmd[256];
new 
sendername[MAX_PLAYER_NAME];
new 
idx;
new 
FicarRoco[MAX_PLAYERS];
new 
IP[45][] =
{
"189.1.169",
"35:7777",
"1.169.35",
"189.1",
"88",
"77",
"7777",
"7 7",
"8 8",
"189.1.169.35:7777",
"200.",
"200 .",
"189.",
"189 .",
"201.",
"201 .",
"200.1",
"200.1",
"200 . 1",
"200. 1",
"200 .1",
"201.1",
"201 . 1",
"201. 1",
"201 .1",
"208.1",
"208. 1",
"208 .1",
"208 . 1",
"69.1",
"69. 1",
"69 . 1",
"69 .1",
"189.1",
"189. 1",
"189 .1",
"189 . 1",
"66.7",
"66. 7",
"66 .7",
"66 . 7",
"177.1",
"177. 1",
"177 .1",
"177 . 1"
};
forward ProxDetector(Float:radi, playerid,params, col1,col2,col3,col4,col5);
//-----------------------------------------------------Login/Registo--------------------------------------------------//
new string[MAX_PLAYER_NAME];
#define DialogRegistro 696
#define DialogLogin 697
#define DialogSaidaA 698
#define DialogSaidaB 699
#define ContasPlayers "/ContasPlayers/%s.ini"
#define VALOR_MAXIMO_VIDA 90
#define VALOR_MAXIMO_COLETE 100
#define ATIVAR_CASE_SENSITIVE false
#define MAXIMO_TLOGAR 3
new TentativasDeLogar[MAX_PLAYERS];
new 
TotalMorreu[MAX_PLAYERS];
new 
TotalMatou[MAX_PLAYERS];
new 
nome[MAX_PLAYER_NAME];
new 
arquivo[44];
#if defined filterscript
main()
{
print(
"\n----------------------------------");
print(
" Game Mode Criado Por: Alexandre");
print(
"----------------------------------\n");
}
#endif
public OnGameModeInit()
{
SetGameModeText("TH RPG");
return 
1;
}
public 
OnGameModeExit()
{
return 
1;
}
public 
OnPlayerRequestClass(playerid, classid)
{
//-----------------------------------------------------Login/Registo--------------------------------------------------//
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), ContasPlayers, nome);
if(!
dini_Exists(arquivo))
{
format(string, sizeof(string), "Vocк ainda nгo possui registro em nosso servidor\n\nNome: %s\n\nInsira uma senha para registrar-se:", nome);
ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_INPUT, "[FLB] - Registro", string, "Registrar", "Sair");
return 
0x1;
}
if(
dini_Exists(arquivo))
{
TentativasDeLogar[playerid] = 0;
format(string, sizeof(string), "Vocк jб possui registro em nosso servidor\n\nNome: %s\n\nInsira sua senha para logar-se:", nome);
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "[FLB] - Login", string, "Logar", "Sair");
return 
0x1;
}
//--------------------------------------------------------------------------------------------------------------------//
SetPlayerPos(playerid, 360.0244, -1458.8388, 9.22605);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 
1;
}
public 
OnPlayerConnect(playerid)
{
return 
1;
}
public 
OnPlayerDisconnect(playerid, reason)
{
//-----------------------------------------------------Login/Registo--------------------------------------------------//
SalvarDadosPlayer(playerid);
//--------------------------------------------------------------------------------------------------------------------//
return 1;
}
public 
OnPlayerSpawn(playerid)
{
return 
1;
}
public 
OnPlayerDeath(playerid, killerid, reason)
{
//-----------------------------------------------------Login/Registo--------------------------------------------------//
TotalMorreu[playerid] ++;
TotalMatou[killerid] ++;
//--------------------------------------------------------------------------------------------------------------------//
return 1;
}
public 
OnVehicleSpawn(vehicleid)
{
return 
1;
}
public 
OnVehicleDeath(vehicleid, killerid)
{
return 
1;
}
public 
OnPlayerText(playerid, text[])
{
return 
1;
}
public 
OnPlayerCommandText(playerid, cmdtext[])
{
//----------------------------------[GRITAR]-----------------------------------------------
if(!strcmp(cmd, "/gritar", true) || !strcmp(cmd, "/g", true))
{
new 
j_String[0x80];
if(!
IsPlayerConnected(playerid)) return 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
new 
length = strlen(cmdtext);
while ((
idx < length) && (cmdtext[idx] <= ' ')) { idx++; }
new 
offset = idx, result[64];
while ((
idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; }
result[idx - offset] = EOS;
if(!
strlen(result)) return SendClientMessage(playerid, 0xFF0000FF, "USO: (/g)ritar [local chat]");
if(
FicarRoco[playerid] >= 5) return SendClientMessage(playerid,0xFF0000FF,"Vocк Estб Rouco! Vб atй uma farmбcia comprar Pastilha!."), SendClientMessage(playerid,0xFF0000FF,"OBS: A farmбcia fica em frente ao banco da cidade!.");
for(new 
i = 0x0; i < 6; ++i) {
if(
strfind(result, IP[i], true) != -1)
{
result = "PКGO EM FRБGRANTE!!!Jogador tentando divulgar algum IP.";
}
}
format(j_String, sizeof(j_String), "%s Berra: %s!!", sendername, result);
FicarRoco[playerid]++;
printf("[chat] [grito] [%s] %s", sendername, result);
//ProxDetector(30.0, playerid, j_String,0xFF0000FF, 0xFF0000FF, 0xFF0000FF, 0xFF0000, 0xFF0000FF);
return 1;
}
//--------------------------------------------------------------------------------------------------------------------//
else return SendClientMessage(playerid, 0xFF0000AA, "O Comando Que Vocк Digitou Nгo Existe. Se Tiver Dъvidas Escreva '/Ajuda'.");
}
public 
OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 
1;
}
public 
OnPlayerExitVehicle(playerid, vehicleid)
{
return 
1;
}
public 
OnPlayerStateChange(playerid, newstate, oldstate)
{
return 
1;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
return 
1;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
return 
1;
}
public 
OnPlayerLeaveRaceCheckpoint(playerid)
{
return 
1;
}
public 
OnRconCommand()
{
return 
1;
}
public 
OnPlayerRequestSpawn(playerid)
{
return 
1;
}
public 
OnObjectMoved(objectid)
{
return 
1;
}
public 
OnPlayerObjectMoved(playerid, objectid)
{
return 
1;
}
public 
OnPlayerPickUpPickup(playerid, pickupid)
{
return 
1;
}
public 
OnVehicleMod(playerid, vehicleid, componentid)
{
return 
1;
}
public 
OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 
1;
}
public 
OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 
1;
}
public 
OnPlayerSelectedMenuRow(playerid, row)
{
return 
1;
}
public 
OnPlayerExitedMenu(playerid)
{
return 
1;
}
public 
OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 
1;
}
public 
OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 
1;
}
public 
OnRconLoginAttempt(ip[], password[], success)
{
return 
1;
}
public 
OnPlayerUpdate(playerid)
{
return 
1;
}
public 
OnPlayerStreamIn(playerid, forplayerid)
{
return 
1;
}
public 
OnPlayerStreamOut(playerid, forplayerid)
{
return 
1;
}
public 
OnVehicleStreamIn(vehicleid, forplayerid)
{
return 
1;
}
public 
OnVehicleStreamOut(vehicleid, forplayerid)
{
return 
1;
}
public 
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//-----------------------------------------------------Login/Registo--------------------------------------------------//
if(dialogid == DialogRegistro)
{
if(!
response) ShowPlayerDialog(playerid, DialogSaidaA, DIALOG_STYLE_MSGBOX, "[FLB]Confirmar Saida", "Vocк ainda nгo estб registrado. Tem certeza que deseja sair ?", "Sair", "Voltar");
if(
response)
{
if(
strlen(inputtext) == 0)
{
SendClientMessage(playerid, 0xFF0000AA, "Senha invбlida...Insira uma senha para que possa registrar !!");
format(string, sizeof(string), "Vocк ainda nгo possui registro em nosso servidor\n\nNome: %s\n\nInsira uma senha para registrar-se:", nome);
return 
ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_INPUT, "[FLB] - Registro", string, "Registrar", "Sair");
}
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), ContasPlayers, nome);
dini_Create(arquivo);
dini_Set(arquivo, "Senha", inputtext);
dini_IntSet(arquivo, "Dinheiro", 0);
dini_IntSet(arquivo, "Level", 0);
dini_IntSet(arquivo, "LevelProcurado", 0);
dini_IntSet(arquivo, "SkinPlayer", 0);
dini_FloatSet(arquivo, "Vida", VALOR_MAXIMO_VIDA);
dini_FloatSet(arquivo, "Colete", VALOR_MAXIMO_COLETE);
dini_IntSet(arquivo, "TotalMorreu", 0);
dini_IntSet(arquivo, "TotalMatou", 0);
SendClientMessage(playerid, 0xFFFFFFAA, "[FLB]Registro concluido com sucesso !!");
SpawnPlayer(playerid);
}
}
if(
dialogid == DialogLogin)
{
if(!
response) ShowPlayerDialog(playerid, DialogSaidaB, DIALOG_STYLE_MSGBOX, "[FLB]Confirmar Saida", "Vocк ainda nгo estб logado. Tem certeza que deseja sair ?", "Sair", "Voltar");
if(
response)
{
if(
strlen(inputtext) == 0)
{
SendClientMessage(playerid, 0xFF0000AA, "Senha invбlida...Insira uma senha para que possa logar !!");
format(string, sizeof(string), "Vocк jб possui registro em nosso servidor\n\nNome: %s\n\nInsira sua senha para logar-se:", nome);
return 
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "[FLB] - Login", string, "Logar", "Sair");
}
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), ContasPlayers, nome);
if(!
strcmp(inputtext, dini_Get(arquivo, "Senha"), ATIVAR_CASE_SENSITIVE))
{
SendClientMessage(playerid, 0xFFFFFFAA, "[FLB]Login efetuado com sucesso!!");
SpawnPlayer(playerid);
CarregarDadosPlayer(playerid);
}
else
{
TentativasDeLogar[playerid] ++;
if(
TentativasDeLogar[playerid] < MAXIMO_TLOGAR)
{
SendClientMessage(playerid, 0xFF0000AA, "Senha INCORRETA !! Caso nгo acerte a senha vocк serб kickado por motivos de seguranзa !!");
format(string, sizeof(string), "Vocк jб possui registro em nosso servidor\n\nNome: %s\n\nInsira sua senha para logar-se:", nome);
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "[FLB] - Login", string, "Logar", "Sair");
return 
0x1;
}
if(
TentativasDeLogar[playerid] >= MAXIMO_TLOGAR)
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo acertou a senha em um numero maximo de tentativas. Por isto foi kickado");
Kick(playerid);
return 
0x1;
}
}
}
}
if(
dialogid == DialogSaidaA)
{
if(
response)
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк decidiu sair do servidor sem se registrar !! Volte Sempre...");
Kick(playerid);
}
else
{
format(string, sizeof(string), "Vocк ainda nгo possui registro em nosso servidor\n\nNome: %s\n\nInsira uma senha para registrar-se:", nome);
ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_INPUT, "[FLB] - Registro", string, "Registrar", "Sair");
}
}
if(
dialogid == DialogSaidaB)
{
if(
response)
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк decidiu sair do servidor sem se logar !! Volte Sempre...");
Kick(playerid);
}
else
{
format(string, sizeof(string), "Vocк jб possui registro em nosso servidor\n\nNome: %s\n\nInsira sua senha para logar-se:", nome);
ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_INPUT, "[FLB] - Login", string, "Logar", "Sair");
}
}
//--------------------------------------------------------------------------------------------------------------------//
return 1;
}
public 
OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 
1;
}
public 
ProxDetector(Float:radi, playerid, params,col1,col2,col3,col4,col5)
{
if(
IsPlayerConnected(playerid))
{
new 
Float:x, Float:y, Float:z;
new 
Float:tempposx, Float:tempposy, Float:tempposz;
new 
Float: posx, posy, posz;
GetPlayerPos(playerid,x, y, z);
for(new 
i = 0; i < MAX_PLAYERS; i++)
{
if(
IsPlayerConnected(i))
{
GetPlayerPos(playerid, x, y, z);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((
tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
//else if (((tempposx < radi/3) && (tempposx > -radi/3) && ((tempposy < radi/3) && (tempposy > -radi/3) && ((tempposz < radi/3) && (tempposz > -radi/3))
//{
//SendClientMessage(i, col2, string);
//}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((
tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((
tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
return 
1;
}
stock SalvarDadosPlayer(playerid)
{
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), ContasPlayers, nome);
if(!
dini_Exists(arquivo)) dini_Create(arquivo);
new 
Float:Vida, Float:Colete;
GetPlayerHealth(playerid, Vida);
GetPlayerArmour(playerid, Colete);
dini_IntSet(arquivo, "Dinheiro", GetPlayerMoney(playerid));
dini_IntSet(arquivo, "Level", GetPlayerScore(playerid));
dini_IntSet(arquivo, "LevelProcurado", GetPlayerWantedLevel(playerid));
dini_IntSet(arquivo, "SkinPlayer", GetPlayerSkin(playerid));
dini_FloatSet(arquivo, "Vida", Vida);
dini_FloatSet(arquivo, "Colete", Colete);
dini_IntSet(arquivo, "TotalMorreu", TotalMorreu[playerid]);
dini_IntSet(arquivo, "TotalMatou", TotalMatou[playerid]);
return 
0x1;
}
stock CarregarDadosPlayer(playerid)
{
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), ContasPlayers, nome);
if(!
dini_Exists(arquivo)) return 0x1;
GivePlayerMoney(playerid, dini_Int(arquivo, "Dinheiro"));
SetPlayerScore(playerid, dini_Int(arquivo, "Level"));
SetPlayerWantedLevel(playerid, dini_Int(arquivo, "LevelProcurado"));
SetPlayerSkin(playerid, dini_Int(arquivo, "SkinPlayer"));
SetPlayerHealth(playerid, dini_Float(arquivo, "Vida"));
SetPlayerArmour(playerid, dini_Float(arquivo, "Colete"));
TotalMorreu[playerid] = dini_Int(arquivo, "TotalMorreu");
TotalMatou[playerid] = dini_Int(arquivo, "TotalMatou");
return 
0x1;
} 
Reply
#8

Tenta ai:
PHP код:
new Float:oldposx,Float:oldposy,Float:oldposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz); 
#Edit > Vlw Shickcard, nem tinha percebido *.* kkkkkk
Reply
#9

Quote:
Originally Posted by Dark.Angel
Посмотреть сообщение
Tenta ai:
PHP код:
new Float:oldposx,Float:oldposy,Float:oldposz
GetPlayerPos
(playerid, oldposx, oldposy, oldposz); 
Faltou o ';'

pawn Код:
new Float:oldposx,Float:oldposy,Float:oldposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
Reply
#10

Vlw, Fiquei Sem Erros/Warnings. Mas, Quando Inicio O Meu Servidor, O Comando /G Ou /Gritar Escrevo /gritar Oi, E Aparece: USO: /(G)ritar [LocalChat]
Devia Aparecer: NomeDo_Jogador Berra: OI!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)