Entity/GetNWInt

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Bug)
 
Line 18: Line 18:
 
}}
 
}}
 
{{Ret
 
{{Ret
|type=number
+
|type=any
|desc=The stored integer, or the fallback if it doesn't exist.
+
|desc=The value associated with the key
 
}}
 
}}

Latest revision as of 09:48, 12 April 2019

 Entity:GetNWInt( )

Contents

Description

Retrieves a networked integer (whole number) value that was previously set by Entity:SetNWInt.

BUG

This function will not round decimal values as it actually networks a float internally.

Issue Tracker: #3374

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

any

The value associated with the key
Personal tools
Navigation