SA-MP Forums Archive
[AJUDA]Erro TextDraw! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]Erro TextDraw! (/showthread.php?tid=280108)



[AJUDA]Erro TextDraw! - ReDKiiL - 30.08.2011

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



Re: [AJUDA]Erro TextDraw! - CocaC0la - 30.08.2011

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



Respuesta: [AJUDA]Erro TextDraw! - chapa - 30.08.2011

Sim sim vc nao definio playerid.


Respuesta: [AJUDA]Erro TextDraw! - ReDKiiL - 30.08.2011

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);




Respuesta: [AJUDA]Erro TextDraw! - chapa - 30.08.2011

olha a public UpdateTime .espaco etc.


Respuesta: [AJUDA]Erro TextDraw! - ReDKiiL - 30.08.2011

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?



Respuesta: [AJUDA]Erro TextDraw! - chapa - 30.08.2011

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.


Re: [AJUDA]Erro TextDraw! - Vai_Besta - 30.08.2011

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



Re: [AJUDA]Erro TextDraw! - StrondA_ - 30.08.2011

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++;
}
}