ReadFloat

From NPC for VCMP 0.4 Servers
Revision as of 17:44, 24 June 2023 by Habi (talk | contribs) (Created page with "{{Welcome|desc=This will read a float from the blob of onServerData.|params=<source lang="lua">( data )</source><poem> ::data : The blob obtained from onServerData </poem>| example=<source lang="lua"> function OnServerData( data ) { local a = ReadFloat(data); print("I received float " + a + " from server\n"); } </source>| retvals=The function returns the float on success. On failure throw error.| relfuncs=*ReadInt *ReadByte *ReadString *OnSe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Description:
This will read a float from the blob of onServerData.


Parameters:

( data )

data : The blob obtained from onServerData


Return Values:
The function returns the float on success. On failure throw error.


Example

function OnServerData( data )
{
    local a = ReadFloat(data);
    print("I received float " + a + " from server\n");
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.