error udentified symbol on textdraw
#1

as the tittle say , i got error after i put Textdraw on my Game mode.
this code i use

I place this ongamemodeinit
Код:
	//LARPTitle
	LARPTitle = TextDrawCreate(550.000000, 370.000000, "www.larp-gaming.com");
	TextDrawAlignment(LARPTitle, 2);
	TextDrawBackgroundColor(LARPTitle, 255);
	TextDrawFont(LARPTitle, 1);
	TextDrawLetterSize(LARPTitle, 0.330000, 1.300000);
	TextDrawColor(LARPTitle, 1087373311);
	TextDrawSetOutline(LARPTitle, 0);
	TextDrawSetProportional(LARPTitle, 1);
	TextDrawSetShadow(LARPTitle, 3);
	TextDrawUseBox(LARPTitle, 1);
	TextDrawBoxColor(LARPTitle, 150);
	TextDrawTextSize(LARPTitle, 462.000000, 125.000000);
	textdrawscount++;
	
	//LARPTitle2
	LARPTitle2 = TextDrawCreate(550.000000, 386.000000, "Los Angeles");
	TextDrawAlignment(LARPTitle2, 2);
	TextDrawBackgroundColor(LARPTitle2, 255);
	TextDrawFont(LARPTitle2, 3);
	TextDrawLetterSize(LARPTitle2, 0.519999, 2.899999);
	TextDrawColor(LARPTitle2, -19263745);
	TextDrawSetOutline(LARPTitle2, 1);
	TextDrawSetProportional(LARPTItle2, 1);
	TextDrawSetShadow(LARPTitle2, 0);
	TextDrawUseBox(LARPTitle2, 1);
	TextDrawBoxColor(LARPTitle2, 50);
	TextDrawTextSize(LARPTitle2, 10.000000, 125.000000);
	textdrawscount++;

	//LARPTitle3
	LARPTitle3 = TextDrawCreate(550.000000, 410.000000, "Role Play");
	TextDrawAlignment(LARPTitle3, 2);
	TextDrawBackgroundColor(LARPTitle3, 255);
	TextDrawFont(LARPTitle3, 0);
	TextDrawLetterSize(LARPTitle3, 0.609999, 1.200000);
	TextDrawColor(LARPTitle3, -19263745);
	TextDrawSetOutline(LARPTitle3, 1);
	TextDrawSetProportional(LARPTItle3, 1);
	TextDrawSetShadow(LARPTitle3, 4);
	TextDrawUseBox(LARPTitle3, 0);
	TextDrawBoxColor(LARPTitle3, 50);
	TextDrawTextSize(LARPTitle3, 13.000000, 125.000000);
	textdrawscount++;

	//LARPTitle4
	LARPTitle4 = TextDrawCreate(550.000000,	420.000000, "Multiplayer");
	TextDrawAlignment(LARPTitle4, 2);
	TextDrawBackgroundColor(LARPTitle4, 255);
	TextDrawFont(LARPTitle4, 3);
	TextDrawLetterSize(LARPTitle4, 0.500000, 1.900000);
	TextDrawColor(LARPTitle4, -19263745);
	TextDrawSetOutline(LARPTitle4, 1);
	TextDrawSetProportional(LARPTItle4, 1);
	TextDrawSetShadow(LARPTitle4, 4);
	TextDrawUseBox(LARPTitle4, 1);
	TextDrawBoxColor(LARPTitle4, 50);
	TextDrawTextSize(LARPTitle4, -4.000000, -133.000000);
	textdrawscount++;
and then i put this on onplayerspawn
Код:
	TextDrawShowForPlayer(playerid, LARPTitle);
	TextDrawShowForPlayer(playerid, LARPTitle2);
	TextDrawShowForPlayer(playerid, LARPTitle3);
	TextDrawShowForPlayer(playerid, LARPTitle4);
and the last when i click compile it shown like this
Код:
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(11471) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(11472) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(11473) : error 017: undefined symbol "LARPTitle3"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(11474) : error 017: undefined symbol "LARPTitle4"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19137) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19138) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19139) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19140) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19141) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19142) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19143) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19144) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19145) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19146) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19147) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19148) : error 017: undefined symbol "LARPTitle"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19152) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19153) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19154) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19155) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19156) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19157) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19158) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19159) : error 017: undefined symbol "LARPTItle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19160) : error 017: undefined symbol "LARPTitle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19161) : error 017: undefined symbol "LARPTitle2"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
what should i do ? is there any miss writing or ?
Reply
#2

You need to create /EVERY/ variable for the textdraws.
Example:

pawn Код:
new Text:LARPTitle;
new Text:LARPTitle2;
new Text:LARPTitle3;
new Text:LARPTitle4;
Here I even did it for you, copy this into your gamemode OUTSIDE any function ^

-- Read about it at: https://sampwiki.blast.hk/wiki/TextDrawCreate
Reply
#3

You didn't define them at all at the top.
pawn Код:
new Text:LARPTitle;
new Text:LARPTitle2;
new Text:LARPTitle4;
new Text:LARPTitle3;
Reply
#4

can i put this under #include ?
Reply
#5

Yes, you can. You can place it anywhere you want.
Just outside any function.

(Forgot to note: Place it above the CreateTextdraw functions in the gamemode. If you place them after you complete the CreateTextdraw it will error)
Reply
#6

after i put that code , its works! but just decreased the error
i got some error again

Код:
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19165) : error 017: undefined symbol "LARPTItle2"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19180) : error 017: undefined symbol "LARPTItle3"
D:\GTA-SanAndreas + Server\Server\gamemodes\LARP.pwn(19195) : error 017: undefined symbol "LARPTItle4"
what is that ? any missing again
Reply
#7

Код:
new Text:LARPTitle;
new Text:LARPTitle2;
new Text:LARPTitle4;
new Text:LARPTitle3;
search for : new and paste it there
Reply
#8

Press CRLT + G and enter: 19165.
Replace: LARPTItle2 -> LARPTitle2

Press CRLT + G and enter: 19180.
Replace: LARPTItle3 -> LARPTitle3

Press CRLT + G and enter: 19195.
Replace: LARPTItle4 -> LARPTitle4

See the difference?
LARPTItle2 -> LARPTitle2 (Look at the TItle and Title)
Reply
#9

Oh Yeah its Fixed , it bcz i put LARPTItle not LARPTitle , now its fixed
Thanks all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)