Qbox-project / qbx_core

http://qbox-project.github.io
Other
45 stars 109 forks source link

playerState return nulls while checking for hunger and thirst #455

Closed CDocc closed 2 months ago

CDocc commented 2 months ago

Summary

playerState return nulls while checking for hunger and thirst in qbx_core/client/loops.lua

Reproduction

head to the file qbx_core/client/loops.lua add this print print('playerstate :'..json.encode(playerState)) after the wait restart server and it will return the following playerstate : [] image

Expected behavior

expect it to collect the player state correctly so that it is not returning null

Actual behavior

not collecting the player state

Additional context

we were messing around testing some stuff, noticed that when food and hunger is 0 it does not do health damage so i proceeded to add prints to see what the problem was and up adding the prints and restart the server, the playerState variable returns nothing, which is clearly the problem as to why this is happening.

Current Version

v1.11.0

Custom Resources

um-multicharacter & um-spawn