Raised This Month: $ Target: $400
 0% 

Tag mismatch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-10-2011 , 10:53   Tag mismatch
Reply With Quote #1

PHP Code:
new Float:gGravity[SH_MAXSLOTS+1]

public 
get_gravity(id)
{
    
gGravity[id] = get_user_gravity(id)

This is what I have to get the gravity of a user. When I do this:

PHP Code:
set_user_gravity(idgGravity
I get tag mismatch on the second param. I really don't get why.

Anyone knows this?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-10-2011 , 11:02   Re: Tag mismatch
Reply With Quote #2

gGravity[id]
__________________
xPaw is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-10-2011 , 11:05   Re: Tag mismatch
Reply With Quote #3

ahh stupid me

Thanks.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-10-2011 , 12:28   Re: Tag mismatch
Reply With Quote #4

ok, new question. I get tag mismatch in the line with the check in this code:

PHP Code:
    new Float:delay get_pcvar_num(pcvarTeleDelay)
    if ( 
delay 0.0 )
    {
        
delay 0.0
    

__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-10-2011 , 12:36   Re: Tag mismatch
Reply With Quote #5

get_pcvar_float
__________________
xPaw is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 01-10-2011 , 12:36   Re: Tag mismatch
Reply With Quote #6

Code:
    new Float:delay = float(get_pcvar_num(pcvarTeleDelay))     if ( delay < 0.0 )     {         delay = 0.0     }
Or if you r sure that the cvar is a Float then you can do this
Code:
    new Float:delay = get_pcvar_float(pcvarTeleDelay)     if ( delay < 0.0 )     {         delay = 0.0     }
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-10-2011 , 12:38   Re: Tag mismatch
Reply With Quote #7

Doh. Dunno what I was thinking. Thanks!
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 01-11-2011 , 07:58   Re: Tag mismatch
Reply With Quote #8

Quote:
Originally Posted by abdul-rehman View Post
Or if you r sure that the cvar is a Float then you can do this
You don't need to be sure. get_pcvar_float allways return float. Even if CVAR value is "3", "3.01", "ddddd"
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 01-11-2011 , 09:25   Re: Tag mismatch
Reply With Quote #9

Quote:
Originally Posted by Flipper_SPb View Post
You don't need to be sure. get_pcvar_float allways return float. Even if CVAR value is "3", "3.01", "ddddd"
What is the float term of "ddddd"?
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Elusive138
Senior Member
Join Date: Dec 2010
Old 01-11-2011 , 09:55   Re: Tag mismatch
Reply With Quote #10

Quote:
Originally Posted by Jelle View Post
What is the float term of "ddddd"?
That should return 0.0

str_to_num("ddddd") would return 0 and str_to_num("15ddddd") would return 15. I've never tested with anything else, but they should be the same? You could always go test it yourself

Last edited by Elusive138; 01-11-2011 at 12:41.
Elusive138 is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 02:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode