cybers2001 Posted October 13, 2025 Share Posted October 13, 2025 I'm working on a client-only mod that is trying to observe a variable that is shared via net_tinybyte, specifically "weather._preciptype". This is what I have: AddPlayerPostInit(function(inst) inst:ListenForEvent("setowner", function(inst) if inst == GLOBAL.ThePlayer then inst:ListenForEvent("preciptypedirty", OnPrecipDirty) inst._preciptype = net_tinybyte(inst.GUID, "weather._preciptype", "preciptypedirty") inst.riftActive = inst._preciptype.value() == "acidrain" inst:DoTaskInTime(1, function(inst) StartBiomeDetectionUpdate(inst) end) end end) end) Calling net_tinybyte crashes my game, though, claiming that it's nil. How do I use this for a client mod? Link to comment https://forums.kleientertainment.com/forums/topic/168402-attempt-to-call-global-net_tinybyte-a-nil-value/ Share on other sites More sharing options...
Rickzzs Posted October 13, 2025 Share Posted October 13, 2025 Perhaps GLOBAL.net_tinybyte? 1 Link to comment https://forums.kleientertainment.com/forums/topic/168402-attempt-to-call-global-net_tinybyte-a-nil-value/#findComment-1839908 Share on other sites More sharing options...
cybers2001 Posted October 13, 2025 Author Share Posted October 13, 2025 13 hours ago, Rickzzs said: Perhaps GLOBAL.net_tinybyte? Yep, that did it, thanks! No idea why it was required, as other mods had no need for it. Link to comment https://forums.kleientertainment.com/forums/topic/168402-attempt-to-call-global-net_tinybyte-a-nil-value/#findComment-1839941 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now