#1

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.
Reply
#2

public HideText(playerid)

forward HideText(playerid);
Reply
#3

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;
}
Reply
#4

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.
Reply
#5

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

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

Someone see problem??
Reply
#8

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;
}
Reply
#9

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,
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)