[AJUDA]Erro TextDraw!
#1

Ai Galera TO Criando Um Text Draw. e Ta Dando Um Erro:

Quote:

D:\Usuarios\Documentos\Servidor SAMP [HS]\filterscripts\relogio.pwn(26) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Public:
Quote:

public UpdateTime()
{
format(score, sizeof(score), "Score: %i",GetPlayerScore(playerid));//Linha Com o Erro!
TextDrawSetString(tdscore,score);
gettime(hour, minute);
format(timestr,32,"%02d:%02d",hour,minute);
TextDrawSetString(txtTimeDisp,timestr);

SetWorldTime(hour);

new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
}

Espero Que Me Ajudem
Reply
#2

pawn Код:
forward UpdateTime(playerid);
public UpdateTime(playerid)
Reply
#3

Sim sim vc nao definio playerid.
Reply
#4

Quote:

D:\Usuarios\Documentos\Servidor SAMP [HS]\filterscripts\relogio.pwn(75) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

Linhas:
Quote:

UpdateTime();//Linha Com Warning
SetTimer("UpdateTime",1000 * 60,1);

Reply
#5

olha a public UpdateTime .espaco etc.
Reply
#6

Public Update Time:
Quote:

forward UpdateTime(playerid);
public UpdateTime(playerid)
{
format(score, sizeof(score), "Score: %i",GetPlayerScore(playerid));
TextDrawSetString(tdscore,score);
gettime(hour, minute);
format(timestr,32,"%02d:%02d",hour,minute);
TextDrawSetString(txtTimeDisp,timestr);

SetWorldTime(hour);

new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
}

Tem Alguma Coisa Errada?
Reply
#7

a linha Com Warning forward UpdateTime();
deixa so a que vc criou a forward UpdateTime(playerid);
vc criou 2 forward UpdateTime
se sim remove a forward UpdateTime(); e copila ve se da warning.
Reply
#8

substitua sua
pawn Код:
forward UpdateTime();
public UpdateTime()
por
pawn Код:
forward UpdateTime(playerid);
public UpdateTime(playerid)
Reply
#9

Erro resolvido:
pawn Код:
forward UpdateTime();
public UpdateTime()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
format(score, sizeof(score), "Score: %i",GetPlayerScore(i));
TextDrawSetString(tdscore,score);
gettime(hour, minute);
format(timestr,32,"%02d:%02d",hour,minute);
TextDrawSetString(txtTimeDisp,timestr);
SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)