DcSteamUser Posted Thursday at 06:41 PM Report Posted Thursday at 06:41 PM When using SteamUser, I noticed that certain variables are frequently set to null in specific situations within the instance created for the user (e.g., const session = new SteamUser() ). This occurs not only during brief disconnections but also in other scenarios. Why does this happen? How can it be prevented, especially considering that the values were correct before? Ideally, I would like to ensure that the values always remain valid, especially if they were already correct and are never simply reset to null. Is there a way to configure this? Quote
Dr. McKay Posted Friday at 02:33 AM Report Posted Friday at 02:33 AM Values like what? DcSteamUser 1 Quote
DcSteamUser Posted Friday at 09:34 AM Author Report Posted Friday at 09:34 AM (edited) 7 hours ago, Dr. McKay said: Values like what? @Dr. McKay I mean the values of the created SteamUser instance, such as the SteamID, balance, and limitations—essentially everything conveniently stored in the instance. These values are all reset to zero, for example, when the connection is briefly lost, making it difficult for me to work with them. If I then try to retrieve some of these values, like the SteamID, my program crashes immediately because they are no longer set. Edited Friday at 09:35 AM by DcSteamUser Quote
Dr. McKay Posted Friday at 11:03 PM Report Posted Friday at 11:03 PM That's expected behavior. If it's no longer connected to Steam, the data may be stale. Cache it somewhere else yourself if you need it after disconnect. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.