SA-MP Forums Archive
LoL?! - 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)
+--- Thread: LoL?! (/showthread.php?tid=337985)



LoL?! - SpiderWalk - 28.04.2012

Hello everybody.I have problem again with textdraw
pawn Код:
public HideText()
{
    TextDrawHideForAll(Text:Textdraw0);
    TextDrawHideForAll(Text:KillS);
    TextDrawHideForAll(Text:Textdraw1);
    TextDrawHideForPlayer(playerid,Mission0);
    TextDrawHideForPlayer(playerid,Mission1);
    return 1;
}
Errors
Код:
D:\samp03dsvr_win32(1)\gamemodes\MapC.pwn(679) : error 017: undefined symbol "playerid"
D:\samp03dsvr_win32(1)\gamemodes\MapC.pwn(680) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: LoL?! - spedico - 28.04.2012

public HideText(playerid)

forward HideText(playerid);


Re: LoL?! - WackoX - 28.04.2012

Quote:
Originally Posted by spedico
Посмотреть сообщение
public HideText(playerid)

forward HideText(playerid);
Uuhm no?
Код:
public HideText()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawHideForAll(KillS);
    TextDrawHideForAll(Textdraw1);
    TextDrawHideForAll(Mission0);
    TextDrawHideForAll(Mission1);
    return 1;
}



Re: LoL?! - MP2 - 28.04.2012

First of all remove 'Text:' in that code, it's only needed in the declaration ('new Text:blah'), secondly do you want to hide Mission0 for one player or every player? if for all, change it to
TextDrawHideForPlayer(playerid,Mission0);
else add a playerid parameter to your HideText function/timer.

Finally, name your variables better. Textdraw0 - what is that meant to be? if you come back to that code in the future you'll think the same thing. Always give variables relevant names.


Re: LoL?! - spedico - 28.04.2012

He didn't say that did he want to hide all textdraws for a player, or all global ones. So it is correct.


Re: LoL?! - SpiderWalk - 28.04.2012

Error shows only on 2 lines
those
pawn Код:
TextDrawHideForPlayer(playerid,Mission0);
    TextDrawHideForPlayer(playerid,Mission1);
So i dont see problem...


Re: LoL?! - SpiderWalk - 28.04.2012

Someone see problem??


Re: LoL?! - HDFord - 28.04.2012

this should work.
pawn Код:
forward HideText(playerid);
public HideText(playerid)
{
    TextDrawHideForAll(Text:Textdraw0);
    TextDrawHideForAll(Text:KillS);
    TextDrawHideForAll(Text:Textdraw1);
    TextDrawHideForPlayer(playerid,Mission0);
    TextDrawHideForPlayer(playerid,Mission1);
    return 1;
}



Re: LoL?! - Aira - 28.04.2012

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
Error shows only on 2 lines
those
pawn Код:
TextDrawHideForPlayer(playerid,Mission0);
    TextDrawHideForPlayer(playerid,Mission1);
So i dont see problem...
He is right

Quote:

public HideText(playerid)

forward HideText(playerid);

Change it,


Re: LoL?! - SpiderWalk - 28.04.2012

Quote:
Originally Posted by HDFord
Посмотреть сообщение
this should work.
pawn Код:
public HideText(playerid)
{
    TextDrawHideForAll(Text:Textdraw0);
    TextDrawHideForAll(Text:KillS);
    TextDrawHideForAll(Text:Textdraw1);
    TextDrawHideForPlayer(playerid,Mission0);
    TextDrawHideForPlayer(playerid,Mission1);
    return 1;
}
Problem is not in public but problem is in 2 lines
pawn Код:
TextDrawHideForPlayer(playerid,Mission0);
    TextDrawHideForPlayer(playerid,Mission1);