GetGlobalInt error - 0 value

Hello guys. I’m having some problems with GetGlobalInt.

ClientSide function:

local rt = string.ToMinutesSeconds(self:GetRoundTime())
	local ttw, _ = surface.GetTextSize( rt )

	local tw = hw/2 + 5
	draw.WordBox( 4, tw - ttw/2, hy - 45, rt, "Deathrun_SmoothBig", Color( 44, 44, 44, 200 ), Color( 255, 255, 255, 255 ) )


function GM:GetRoundTime()
	return math.Round(math.max( GetGlobalInt( "Deathrun_RoundTime" ) - CurTime(), 0 ))

GetRoundTime on serverside are printing the time, but on clientside “draw.WordBox( 4, tw - ttw/2, hy - 45, rt, “Deathrun_SmoothBig”, Color( 44, 44, 44, 200 ), Color( 255, 255, 255, 255 ) )” the value is 00:00. Any ideia to fixed It?

Because you are calling a shared function clientside. Access GetGlobalInt directly clientside

Make sure your server is up-to-date. Run “lua_run print(VERSIONSTR)” in the server console to double check if it matches the version number of the client.

What? Shared functions work fine on the client. Shared = both server + client.

Read the function wrong, nevermind

For your getters, always define the default ( second arg )… GetGlobalInt( “blah”, 0 ); will return the value of blah or 0…

If you want a networking system overhaul / upgrade, download and use this: - drop it into server addons and it’ll take care of the rest and will let you know when an update is out.

Use the following commands to verify data ( on client and server console; private data will be different depending on what the client can see ) dev_getdata [ x ], dev_getpdata [ x ], dev_getworlddata ( same as dev_getdata 0 ) where x is optional, without it it’ll return all known data and with it ( which is the EntIndex corrected GetID so it won’t shift if maxplayers is different )… pdata = private but by default ( unless you use my flag system ) nothing is set to private yet. When I convert the entire data-system for entities, weapons, vehicles, players over, SaveTable, Table, etc will all be using the flag system and SaveTable will be private.