AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   tag mismatch float (https://forums.alliedmods.net/showthread.php?t=183525)

Snoozy 04-22-2012 16:54

tag mismatch float
 
UserData[id][FloatVal]=0.0;
Gives tag mismatch warning for some reason, even though it is defined Float:FloatVal, in the enum?
How come & how to fix?

Arkshine 04-22-2012 17:00

Re: tag mismatch float
 
_:0.0

fysiks 04-23-2012 00:42

Re: tag mismatch float
 
Also, "FloatVal" should not be declared as a float. You can only index arrays with integers.

Exolent[jNr] 04-24-2012 10:39

Re: tag mismatch float
 
Quote:

Originally Posted by fysiks (Post 1694917)
Also, "FloatVal" should not be declared as a float. You can only index arrays with integers.

I think he meant he did something like this:
Code:
enum MyEnum {     SomeInt,     Float:SomeFloat }; new data[MyEnum]; data[SomeFloat] = 0.0;

fysiks 04-24-2012 18:37

Re: tag mismatch float
 
Quote:

Originally Posted by Exolent[jNr] (Post 1695636)
I think he meant he did something like this:
Code:
enum MyEnum {     SomeInt,     Float:SomeFloat }; new data[MyEnum]; data[SomeFloat] = 0.0;

Oh, that would make a difference :).


All times are GMT -4. The time now is 07:41.

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