Updated SetNWInt problem

Hello there, after new update SetNWInt stopped reading not round numbers.

Before update i used this:
[LUA]
v:SetNWInt( “Stamina”, math.Clamp(stamina + 0.5, 0, 100))
[/LUA]
Now:
[LUA]
v:SetNWInt( “Stamina”, math.Clamp(stamina + 1, 0, 100))
[/LUA]

So as i understand now i can’t use 0.5 right? math.Round doesn’t fix this problem, anybody test this?

[LUA]
v:SetNWFloat( “Stamina”, math.Clamp(stamina + 0.1, 0, 100))
[/LUA]

Hmm…seems doesn’t work too…

Weird, Phoenix says something is wrong with net messages aswell since the update.

Make sure you are reading the value as Float too.



] lua_run Entity(1):SetNWFloat("Staminalol", .123)
> Entity(1):SetNWFloat("Staminalol", .123)...
] lua_run_cl print(Entity(1):GetNWFloat("Staminalol", -1))
0.12300000339746


You shouldn’t need to network stamina as it changes…

https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/basic_stamina_system/sh_basic_stamina_system.lua.html

https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/basic_stamina_system/sh_extended_stamina_system.lua.html

[ NOTE ] Remove .html to view / copy .Lua …