clickable textdraw
#1

hey guys pls could somebody help me?
i used ipleomax to create some textdraws + a clickable one.
but it gives me error

here is the script:
Код:
		if(clickedid == Textdraw6[playerid])
		{
			PlayerTextDrawDestroy(playerid, Textdraw0[playerid]);
			Textdraw0[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw1[playerid]);
			Textdraw1[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw2[playerid]);
			Textdraw2[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw3[playerid]);
			Textdraw3[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw4[playerid]);
			Textdraw4[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw5[playerid]);
			Textdraw5[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw6[playerid]);
			Textdraw6[playerid] = PlayerText:INVALID_TEXT_DRAW;

			PlayerTextDrawDestroy(playerid, Textdraw7[playerid]);
			Textdraw7[playerid] = PlayerText:INVALID_TEXT_DRAW;
		}
here is the error:

Код:
D:\RGP 3.e\gamemodes\RGP.pwn(3318) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
here is line 3318:
Код:
if(clickedid == Textdraw6[playerid])
Reply
#2

Please paste the definition of Textdraw6
And also, the header of the callback
Reply
#3

Код:
new PlayerText:Textdraw6[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};

	Textdraw6[playerid] = CreatePlayerTextDraw(playerid, 286.500, 294.559, "Start");
	PlayerTextDrawLetterSize(playerid, Textdraw6[playerid], 0.449, 1.600);
	PlayerTextDrawTextSize(playerid, Textdraw6[playerid], 347.000, 8.399);
	PlayerTextDrawAlignment(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawColor(playerid, Textdraw6[playerid], -1);
	PlayerTextDrawUseBox(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawBoxColor(playerid, Textdraw6[playerid], 6553410);
	PlayerTextDrawSetOutline(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, Textdraw6[playerid], 51);
	PlayerTextDrawFont(playerid, Textdraw6[playerid], 2);
	PlayerTextDrawSetProportional(playerid, Textdraw6[playerid], 1);
	PlayerTextDrawSetSelectable(playerid, Textdraw6[playerid], true);
Reply
#4

Please paste the header of the callback, you are probably using

pawn Код:
OnPlayerClickTextDraw(playerid, Text:clickedid);
instead of

pawn Код:
OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
Reply
#5

got more errors after doing that
Код:
D:\XTC 3.e\gamemodes\RGP.pwn(3315) : error 055: start of function body without function header
D:\XTC 3.e\gamemodes\RGP.pwn(3316) : error 010: invalid function or declaration
D:\XTC 3.e\gamemodes\RGP.pwn(3318) : error 010: invalid function or declaration
D:\XTC 3.e\gamemodes\RGP.pwn(3323) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3326) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3329) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3332) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3335) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3338) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3341) : error 021: symbol already defined: "PlayerTextDrawDestroy"
D:\XTC 3.e\gamemodes\RGP.pwn(3346) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Reply
#6

Remove the semicolon behind the function header.
Reply
#7

well it got fixed... thanks so much Vince. lol what a noob i am i forgot to delete that :P
anyway.i just tried to show the textdraws but it seems like clickable textdraws are kinda different with the normal ones... this one doesn't work

Код:
	TextDrawShowForPlayer(playerid, Textdraw0);
	TextDrawShowForPlayer(playerid, Textdraw1);
	TextDrawShowForPlayer(playerid, Textdraw2);
	TextDrawShowForPlayer(playerid, Textdraw3);
	TextDrawShowForPlayer(playerid, Textdraw4);
	TextDrawShowForPlayer(playerid, Textdraw5);
	TextDrawShowForPlayer(playerid, Textdraw6);
	TextDrawShowForPlayer(playerid, Textdraw7);
Reply
#8

NVM fixed +Rep guys. thx
Reply
#9

im so sry for posting again.
it compiled successfully but when i ran the server , i couldn't click on that clickable textdraw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)