#Access Error ?

1 messages · Page 1 of 1 (latest)

opaque lance
#

When I create a new race from scratch, there is no problem. However, if the server & script are restarted, the races in the SETUP section do not appear and if I switch to another tab (available for example) and return to SETUP again, the script breaks. It also throws an error via F8.

I don't know the reason, I wonder why. Do I need to open a setting in Config?

It also happens when I do a setup from 0.
If I delete the races registered in SQL and create a new race, it is fixed, the race appears in the setup section, but if it is restarted for any reason, it rewinds to the beginning and the setup section disappears, the races do not appear.

I will add a few SS..

indigo falcon
#

Weird error. Hmm

#

Is it possible that you set up the DB wrong?
Access is supposed to default to {} not NULL

#

It's erroring right now because your Access is NULL, which shouldn't be a thing as the access should default to {} on creation.
The reason it works on creation is because the tracks are kept server side (so we dont have to fetch the tracks from the DB every time) and on creation we assign access as '{}' in server side. It then breaks when restarting the script because it refetches the tracks from the DB and one turns out to have a NULL instead of {}

#

If you're not to well aquainted with DBs you can prooooobably just replace the line where it errors with:

if track.Access && track.Access[type] ~= nil then
opaque lance
#

Also, I tried the small change you sent, but it didn't work.

#

Addition: When I click on "EDIT ACCESS" from the races, it gives this warning.