Fix For Adoon Account Table Index is nil

If you got a Error like this:

[script:esx_addonacco] SCRIPT ERROR: @esx_addonaccount/server/main.lua:19: table index is nil
[script:esx_addonacco] > handler (@esx_addonaccount/server/main.lua:19)
[script:esx_addonacco] > query_default (@oxmysql/dist/server/build.js:16108)
[script:esx_addonacco] > processTicksAndRejections (node:internal/process/task_queues:96)

Goto esx_addonaccount\server\main.lua on line 17:

if account.money then
SharedAccounts[account.name] = CreateAddonAccount(account.name, nil, account.money)
else
newAccounts[#newAccounts + 1] = {account.name, 0}
end
end

replace with:

if account.money then
if account.name then
SharedAccounts[account.name] = CreateAddonAccount(account.name, nil, account.money)
end
else
newAccounts[#newAccounts + 1] = {account.name, 0}
end

Still Have the Issue:
After that go into your Database and paste in this file:
fix.sql

What does it do?

What all of that does it it checks if the Name exist and then it starts
And the SQL fixes a other bug if it does not work to upload the sql it already is in the Database so don´t worry it’s another fix for the issue

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.