What is this warning? it wont go away please help me - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is this warning? it wont go away please help me (
/showthread.php?tid=119180)
What is this warning? it wont go away please help me -
Sampiscool123 - 07.01.2010
Hey,
I am trying to kill my text draw, im trying to make the textdraw that appears on connect dissapear on spawn put it keeps giving a warning. This is my code.
Код:
Command_Spam = TextDrawCreate(251, 152, "Do not spam");
TextDrawAlignment(Command_Spam, 1);
TextDrawFont(Command_Spam, 1);
TextDrawLetterSize(Command_Spam, 1.0, 3.0);
TextDrawColor(Command_Spam, 0xFF0000FF);
TextDrawShowForPlayer(playerid,Command_Spam);
OnPlayerSpawn:
Код:
SetTimer("TextDrawKill",10000,0);
At the bottom of my script:
Код:
forward TextDrawKill( );
TextDrawKill( )
{
TextDrawDestroy(Command_Spam);
}
Warning:
Код:
warning 203: symbol is never used: "TextDrawKill"
Please help me
Thank You
Re: What is this warning? it wont go away please help me -
HydraX - 07.01.2010
replace
Код:
forward TextDrawKill( );
TextDrawKill( )
{
TextDrawDestroy(Command_Spam);
}
with this
pawn Код:
forward TextDrawKill( );
public TextDrawKill( )
{
TextDrawDestroy(Command_Spam);
}
Re: What is this warning? it wont go away please help me -
Sampiscool123 - 07.01.2010
thank you very much but it doesnt destroy the text draw it just stays
Re: What is this warning? it wont go away please help me -
BP13 - 07.01.2010
forward TextDrawKill( );
public TextDrawKill( )
{
TextDrawHideForPlayer(playerid,Command_Spam);
return 1;
}
OnPlayerConnect(playerid);
{
TextDrawShowForPlayer(playerid,Command_Spam);
return 1;
}
Re: What is this warning? it wont go away please help me -
bogeymanEST - 07.01.2010
pawn Код:
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Command_Spam);
SetTimerEx("TextDrawKill", 10000, 0, "i", playerid);
return 1;
}
forward TextDrawKill(playerid);
public TextDrawKill(playerid)
{
TextDrawHideForPlayer(playerid, Command_Spam);
return 1;
}
Re: What is this warning? it wont go away please help me -
BP13 - 07.01.2010
Quote:
Originally Posted by bogeyman_EST
pawn Код:
public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid, Command_Spam); SetTimerEx("TextDrawKill", 10000, 0, "i", playerid); return 1; }
forward TextDrawKill(playerid); public TextDrawKill(playerid) { TextDrawHideForPlayer(playerid, Command_Spam); return 1; }
|
Thanks for posting exactly what I already did.
Re: What is this warning? it wont go away please help me -
bogeymanEST - 08.01.2010
It's not exactly what you did, your code will give errors:
pawn Код:
forward TextDrawKill( );
public TextDrawKill( )
{
TextDrawHideForPlayer(playerid,Command_Spam);//Where is playerid coming from?
return 1;
}
and you also don't set a timer.