SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/02/2013, 12:17 PM   #1
Daslee
Big Clucker
 
Join Date: Jul 2009
Location: Lithuania
Posts: 111
Reputation: 0
Default Can't find tag mismatch

Hello. So I created new stock called Create3DTextLabelA, it's exactly same as Create3DTextLabel, just my stock saves label position in array. And I got tag mismatch warning, but can't find where it is. Here is my code:

Code:
new Float:Labels3D[2000][3];

stock Create3DTextLabelA(text[], color, Float:x, Float:y, Float:z, Float:drawdistance, virtualworld, visiblewalls)
{
	new tmp;
	tmp = Create3DTextLabel(text,color,Float:x,Float:y,Float:z,Float:drawdistance,virtualworld,visiblewalls);
	Labels3D[tmp][0]=x; Labels3D[tmp][1]=y; Labels3D[tmp][2]=z;
	return tmp;
}
Compiler saying, that tag mismatch is on line:
Code:
tmp = Create3DTextLabel(text,color,Float:x,Float:y,Float:z,Float:drawdistance,virtualworld,visiblewalls);
But which one is wrong?
Daslee is offline   Reply With Quote
Old 13/02/2013, 12:41 PM   #2
arakuta
High-roller
 
arakuta's Avatar
 
Join Date: Jan 2011
Location: Itajaí - Brazil
Posts: 2,183
Reputation: 184
Default Re: Can't find tag mismatch

You must use "Float:" only in a variable declaration.

If you wanna get or set the value, you should use only the variable name.

pawn Code:
tmp = Create3DTextLabel(text,color,x,y,z,drawdistance,virtualworld,visiblewalls);
arakuta is offline   Reply With Quote
Old 13/02/2013, 12:59 PM   #3
Daslee
Big Clucker
 
Join Date: Jul 2009
Location: Lithuania
Posts: 111
Reputation: 0
Default Re: Can't find tag mismatch

Quote:
Originally Posted by arakuta View Post
You must use "Float:" only in a variable declaration.

If you wanna get or set the value, you should use only the variable name.

pawn Code:
tmp = Create3DTextLabel(text,color,x,y,z,drawdistance,virtualworld,visiblewalls);
But still getting that warning even without "Float:"...
Daslee is offline   Reply With Quote
Old 13/02/2013, 01:06 PM   #4
CreativityLacker
Big Clucker
 
CreativityLacker's Avatar
 
Join Date: Oct 2012
Location: The chocolate factory
Posts: 134
Reputation: 25
Default Re: Can't find tag mismatch

It should be
pawn Code:
new Text3D:tmp;
__________________
Scripter at Resurrection
91.121.153.202:7778 or resur.cod5samp.com:7778
CreativityLacker is offline   Reply With Quote
Old 13/02/2013, 02:13 PM   #5
Daslee
Big Clucker
 
Join Date: Jul 2009
Location: Lithuania
Posts: 111
Reputation: 0
Default Re: Can't find tag mismatch

I tried this also, so I got same warning on those lines:
pawn Code:
Labels3D[tmp][0]=x; Labels3D[tmp][1]=y; Labels3D[tmp][2]=z;
return tmp;
Daslee is offline   Reply With Quote
Old 13/02/2013, 02:31 PM   #6
Mmartin
Banned
 
Join Date: Jan 2010
Location: Slovakia
Posts: 106
Reputation: 67
Default Re: Can't find tag mismatch

Quote:
Originally Posted by Daslee View Post
I tried this also, so I got same warning on those lines:
pawn Code:
Labels3D[tmp][0]=x; Labels3D[tmp][1]=y; Labels3D[tmp][2]=z;
return tmp;
That's because the inner variables in the array (such as labels3d[tmp][0]) aren't declared as float variables. Fix that and you will get rid of your warning.
Mmartin is offline   Reply With Quote
Old 17/02/2013, 07:26 PM   #7
Daslee
Big Clucker
 
Join Date: Jul 2009
Location: Lithuania
Posts: 111
Reputation: 0
Default Re: Can't find tag mismatch

Quote:
Originally Posted by Mmartin View Post
That's because the inner variables in the array (such as labels3d[tmp][0]) aren't declared as float variables. Fix that and you will get rid of your warning.
You mean this:
pawn Code:
new Float:Labels3D[2000][3];
To:
pawn Code:
new Float:Labels3D[2000][Float:3];

?
Daslee 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
how and where to find Shane_Kingston Server Support 1 25/11/2012 04:49 PM
If someone can find it? danielhertz Scripting Help 0 07/03/2012 09:24 AM
[Help] Argument type mismatch and tag mismatch Spiffyk Help Archive 2 27/12/2010 12:04 PM
where can i find... dendudes123 Help Archive 1 20/06/2010 11:41 AM
[help] /find Oi! Help Archive 4 18/12/2009 11:07 PM


All times are GMT. The time now is 05:20 AM.


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