AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Error: Argument type mismatch (argument 1) on line 212 (https://forums.alliedmods.net/showthread.php?t=127580)

HLM 05-22-2010 17:34

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

new Float:fRealTime = ((get_gametime()/60) - get_pcvar_float("tfc_clanbattle_prematch")); 


Hx7r 05-22-2010 19:59

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

HLM 05-22-2010 20:34

Re: Error: Argument type mismatch (argument 1) on line 212
 
that works, thanks!

now another question: why? I dont understand why pcvars wouldnt work in this situation.

fysiks 05-22-2010 20:38

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

Originally Posted by HLM (Post 1188379)
why? I dont understand why pcvars wouldnt work in this situation.

You are using pcvars incorrectly. Go read about them.

Bugsy 05-22-2010 23:26

Re: Error: Argument type mismatch (argument 1) on line 212
 
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 )


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

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