The error in the title is being spammed in the server log of the developer console:
Anyone know why this happens? I thought it may be happening because of a script saving the player and interacting with the player in an infinite loop, not checking if the player exists; but I am not sure since I checked and edited nearly all scripts that do a similar action.
Before I make even a larger search, I wanted to ask if this is being caused by something else.
I believe this happens when you try to check badge, game pass, or similar ownership of a user that isn’t in the current server, but I’m not exactly sure which API exactly triggers this warning.
Try to see if you get that error in studio, and check if you can click it to go to its “source.” If you can, check the code in that area.
If you cannot, check all of your scripts that require a UserId.
If nothing, the user just probably doesn’t exist, so make sure you are using something along the lines of plr.UserId instead of 1. (plr being the player, 1 being just an id in the code).
Hope this helps.
Okay I can’t go into the script that causes the error by clicking on it, because it is not actually an error. It is a warning.
I made sure that every script that interacted with the UserId property, first checked if the player exists. Did not fix it.
I will try to remove some of the recent scripts I wrote that interact with the UserId, until the problem is fixed. Then I will determine which script exactly causes the problem, and rewrote in a different way, I guess.
The above can take some time, so if you do have another idea, feel free to share it with me ^-^
As of now, the best method I can think of to help is to do print de-bugging. If you don’t know what that means, just add a bunch of print() functions in your scripts, and see what prints, and then you can find the script throwing the warning.
Sorry if this is not much help, but this is what I can conjure up atm.
I thought of that method but I think removing recent scripts that interact with userId one-by-one is the best method, because I believe an infinite loop is what’s causing the problems.