undefined symbol "i" -
Caio_Stak - 05.12.2012
Aк Galera, to colocando um sistema de Ping no meu servidor, mas ao Compilar deu o seguinte erro:
Код:
C:\Users\Caio\Desktop\Servidor Caio\filterscripts\ping.pwn(26) : error 017: undefined symbol "i"
C:\Users\Caio\Desktop\Servidor Caio\filterscripts\ping.pwn(35) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Code abaixo:
Код:
#include <a_samp>
#include <string>
forward AtualizarPing();
new Text:PingT[MAX_PLAYERS];
public OnGameModeInit()
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
PingT[ i ] = TextDrawCreate( 400, 25, " " );
TextDrawFont( PingT[ i ], 3);
TextDrawUseBox( PingT[ i ], 0);
TextDrawSetOutline( PingT[ i ], 1);
TextDrawBackgroundColor( PingT[ i ], 0x32CD32FF);
TextDrawColor( PingT[ i ], 0x000000FF);
TextDrawAlignment( PingT[ i ], 1);
}
SetTimer( "AtualizarPing", 1000, 1 );
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer( i, PingT[ i ] );
return 1;
}
public AtualizarPing()
{
new
string[ 16 ]
;
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( IsPlayerConnected( i ) )
{
new gstring[254];
format( string, sizeof( string ), "Ping: %d", GetPlayerPing(i) );
TextDrawSetString( PingT[ i ], gstring);
}
}
return 1;
}
Espero que possam me ajudar ai
Obrigado!
Re: undefined symbol "i" -
Konstantinos - 05.12.2012
pawn Код:
#include <a_samp>
#include <string>
forward AtualizarPing();
new Text:PingT[MAX_PLAYERS];
public OnGameModeInit()
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
PingT[ i ] = TextDrawCreate( 400, 25, " " );
TextDrawFont( PingT[ i ], 3);
TextDrawUseBox( PingT[ i ], 0);
TextDrawSetOutline( PingT[ i ], 1);
TextDrawBackgroundColor( PingT[ i ], 0x32CD32FF);
TextDrawColor( PingT[ i ], 0x000000FF);
TextDrawAlignment( PingT[ i ], 1);
}
SetTimer( "AtualizarPing", 1000, 1 );
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer( playerid, PingT[ playerid ] );
return 1;
}
public AtualizarPing()
{
new
string[ 16 ]
;
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( IsPlayerConnected( i ) )
{
format( string, sizeof( string ), "Ping: %d", GetPlayerPing(i) );
TextDrawSetString( PingT[ i ], string);
}
}
return 1;
}
Re: undefined symbol "i" -
smiiir - 05.12.2012
Qual a Linha do erro?
To com preguiзa de procurar
Re: undefined symbol "i" -
Konstantinos - 05.12.2012
Quote:
Originally Posted by iSmir
Qual a Linha do erro?
To com preguiзa de procurar
|
LOL.
pawn Код:
// Linha 26:
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer( i, PingT[ i ] ); // <--
return 1;
}
Eu jб consertei, leia acima!
Re: undefined symbol "i" -
smiiir - 05.12.2012
/\
Ahh Suave,
acordei agora, hsuahsa
mo preguiзa de contar as linhas
Re: undefined symbol "i" -
Caio_Stak - 05.12.2012
Obrigado Dwane, vsк me ajudou muito