OnPlayerClickTextDraw
#1

I've been messing with this for a while now - can't seem to figure out what's wrong.

Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
	if(playertextid == Textdraw8[playerid])
	{
		PlayerTextDrawDestroy(playerid, Textdraw8[playerid]);
	}
}
Код:
work.pwn(599) : error 017: undefined symbol "Textdraw8"
work.pwn(599) : warning 215: expression has no effect
work.pwn(599) : error 001: expected token: ";", but found "]"
work.pwn(599) : error 029: invalid expression, assumed zero
work.pwn(599) : fatal error 107: too many error messages on one line
Line 599 is the line:

Код:
	if(playertextid == Textdraw8[playerid])
Reply
#2

Apart of not returning a value i don't see anything in that code.
pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == Textdraw8[playerid])
    {
        PlayerTextDrawDestroy(playerid, Textdraw8[playerid]);
    }
        return 1;//Return 1 here.
}
Post the TextDraw8 info+ definition.
If you don't have the following code add it under the includes.
pawn Код:
new PlayerText:Textdraw8[MAX_PLAYERS];
Reply
#3

Код:
new PlayerText:Textdraw8[MAX_PLAYERS];

Textdraw8[playerid] = CreatePlayerTextDraw(playerid, 339.333343, 204.344436, "usebox");
PlayerTextDrawLetterSize(playerid, Textdraw8[playerid], 0.000000, 2.725310);
PlayerTextDrawTextSize(playerid, Textdraw8[playerid], 287.000000, 0.000000);
PlayerTextDrawAlignment(playerid, Textdraw8[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw8[playerid], 255);
PlayerTextDrawUseBox(playerid, Textdraw8[playerid], true);
PlayerTextDrawBoxColor(playerid, Textdraw8[playerid], 255);
PlayerTextDrawSetShadow(playerid, Textdraw8[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw8[playerid], 0);
PlayerTextDrawFont(playerid, Textdraw8[playerid], 0);
PlayerTextDrawSetSelectable(playerid, Textdraw8[playerid], true);
Also, I have the return 1, just didn't copy it when I made the post.
Reply
#4

new PlayerText:Textdraw8[MAX_PLAYERS];


is a global variable?
Reply
#5

Quote:
Originally Posted by ReVo_
Посмотреть сообщение
new PlayerText:Textdraw8[MAX_PLAYERS];


is a global variable?
Oops - it was not. Silly mistake. Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)