Entity/GetNWFloat

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Added bug note)
(Undo revision 29453 by Code gs (talk))
Line 1: Line 1:
 
{{Func
 
{{Func
 
|Description=Retrieves a networked float value at specified index on the entity that is set by {{ClassFunction|Entity|SetNWFloat}}.
 
|Description=Retrieves a networked float value at specified index on the entity that is set by {{ClassFunction|Entity|SetNWFloat}}.
 
{{Warning|Due to a [https://github.com/Facepunch/garrysmod-issues/issues/3374 bug], this function will not round decimal values.}}
 
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
Line 9: Line 7:
 
|type=string
 
|type=string
 
|name=key
 
|name=key
|desc=The key that is associated with the value.
+
|desc=The key that is associated with the value
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=any
 
|type=any
 
|name=fallback
 
|name=fallback
|desc=The value to return if we failed to retrieve the value (if it isn't set).
+
|desc=The value to return if we failed to retrieve the value. (If it isn't set)
 
|default=0
 
|default=0
 
}}
 
}}
 
{{Ret
 
{{Ret
 
|type=number
 
|type=number
|desc=The retrieved value.
+
|desc=The retrieved value
 
}}
 
}}

Revision as of 06:48, 22 February 2018

 Entity:GetNWFloat( )

Contents

Description

Retrieves a networked float value at specified index on the entity that is set by Entity:SetNWFloat.

Arguments

string key

The key that is associated with the value

Arguments

any fallback=0

The value to return if we failed to retrieve the value. (If it isn't set)

Returns

number

The retrieved value
Personal tools
Navigation