Raised This Month: $ Target: $400
 0% 

Error: Argument type mismatch (argument 1) on line 212


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-22-2010 , 17:34   Error: Argument type mismatch (argument 1) on line 212
Reply With Quote #1

PHP Code:
new Float:fRealTime = ((get_gametime()/60) - get_pcvar_float("tfc_clanbattle_prematch")); 
__________________
+|- KARMA Respectively


Last edited by HLM; 05-22-2010 at 18:20.
HLM is offline
Hx7r
Member
Join Date: Mar 2009
Old 05-22-2010 , 19:59   Re: Error: Argument type mismatch (argument 1) on line 212
Reply With Quote #2

get_cvar_float *
Hx7r is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-22-2010 , 20:34   Re: Error: Argument type mismatch (argument 1) on line 212
Reply With Quote #3

that works, thanks!

now another question: why? I dont understand why pcvars wouldnt work in this situation.
__________________
+|- KARMA Respectively

HLM is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-22-2010 , 20:38   Re: Error: Argument type mismatch (argument 1) on line 212
Reply With Quote #4

Quote:
Originally Posted by HLM View Post
why? I dont understand why pcvars wouldnt work in this situation.
You are using pcvars incorrectly. Go read about them.
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-22-2010 , 23:26   Re: Error: Argument type mismatch (argument 1) on line 212
Reply With Quote #5

You should also change 60 to 60.0 since you are doing a calculation with floats.

Theres not much to pcvars.

Var = registercvar

getpcvarfloat( Var )
__________________
Bugsy 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 05:23.


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