SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 31/12/2015, 10:33 AM   #1
itachi
Big Clucker
 
Join Date: Jul 2010
Location: Czech Republic
Posts: 181
Reputation: 2
Default textdraw error

Code:
TextDraw[i][playerid] = CreatePlayerTextDraw(playerid,501.5, TestTD(i), "Hrac _[Honza]_ se odwarpoval do San Fierra");
Code:
stock TestTD(cislo)
{
	switch(cislo)
	{
	    case 0: return 341;
	    case 1: return 331;
	    case 2: return 321;
	    case 3: return 311;
	    case 4: return 301;
	}
	return 0;
}
error :
Code:
error 017: undefined symbol "TextDraw"
          error 001: expected token: ";", but found "]"
          error 029: invalid expression, assumed zero
          fatal error 107: too many error messages on one line
itachi is offline   Reply With Quote
Old 31/12/2015, 10:38 AM   #2
Karan007
Gangsta
 
Karan007's Avatar
 
Join Date: Feb 2015
Posts: 539
Reputation: 67
Default Re: textdraw error

Try this

PHP Code:
TextDraw[playerid] = CreatePlayerTextDraw(playerid,501.5TestTD(i), "Hrac _[Honza]_ se odwarpoval do San Fierra"); 
Karan007 is offline   Reply With Quote
Old 31/12/2015, 10:47 AM   #3
VincenzoDrift
Little Clucker
 
VincenzoDrift's Avatar
 
Join Date: Jun 2014
Posts: 47
Reputation: 3
Default Re: textdraw error

Code:
new Text:TextDraw[playerid]; 
TextDraw[playerid] = CreatePlayerTextDraw(playerid,501.5, TestTD(i), "Hrac _[Honza]_ se odwarpoval do San Fierra");
Try this
__________________
Sorry for my bad english
VincenzoDrift is offline   Reply With Quote
Old 31/12/2015, 10:59 AM   #4
Shinta307
Big Clucker
 
Join Date: Jun 2014
Posts: 135
Reputation: 2
Default Re: textdraw error

Use

new Text:TextDraw[MAX_PLAYERS];
Shinta307 is offline   Reply With Quote
Old 31/12/2015, 12:08 PM   #5
Stanford
Gangsta
 
Stanford's Avatar
 
Join Date: Feb 2012
Posts: 983
Reputation: 84
Default Re: textdraw error

pawn Code:
new PlayerText:pTextDraws[MAX_PLAYERS][MAX_PLAYER_TEXTDRAWS];
At the top of your script.
Note: this array is for player TEXTDRAWS only (CreatePlayerTextDraw)

I hope I helped!
__________________
******: "That code compiles perfectly, but I can tell you now it won't make me a cup of tea."

******: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."
Stanford is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textdraw (error) sanamalik400 Scripting Help 0 23/12/2015 06:37 AM
Textdraw error Joshswag Scripting Help 8 22/11/2012 05:02 AM
Textdraw Error![0.3c] nGen.SoNNy Help Archive 7 22/12/2010 09:18 AM
TextDraw error RenisiL Help Archive 10 11/12/2009 02:20 PM
[HELP] TextDraw Error LuxurioN™ Help Archive 2 15/07/2009 04:27 PM


All times are GMT. The time now is 04:13 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.