So I manually installed ESX and all the related files on my server, and in doing so I had to remove the “essentials” database from the .sql files. This means that everything is being saved on my original ZapHosting database. The location is saving in the database, but my assumption is that their location doesn’t save due to ESX trying to call the location from the “essentials” database, which would come up as NIL. I am trying to change where it calls the position from, and believe it is located within this code:
-- Get job name, grade and last position
table.insert(tasks2, function(cb2)
MySQL.Async.fetchAll('SELECT job, job_grade, loadout, position FROM `users` WHERE `identifier` = @identifier', {
['@identifier'] = player.getIdentifier()
}, function(result)
userData.job['name'] = result[1].job
userData.job['grade'] = result[1].job_grade
if result[1].loadout ~= nil then
userData.loadout = json.decode(result[1].loadout)
end
if result[1].position ~= nil then
userData.lastPosition = json.decode(result[1].position)
end
cb2()
end)
end)
However I could be completely wrong. I would really appreciate some help on how I can go about getting ESX to properly load the position from the database.
You simply go to SQL and then edit pos table make their CHAR to be 255.
The SQL file or my SQL?
I’m not too experienced with Lua or SQL, so that kind of flew over my head. Sorry for sounding like a novice.
It’s fine, we all been through that, you simply go to users, you will see positions there in Table:Users if you use HeidiSQL, just scroll a little bit down and you will see position, change it to 255.
I haven’t slept in 3 days, so it’s probably very obvious, but I don’t actually see that. 
Forgot to mention the whole phpMyAdmin thing. Sorry.
Don’t you have any SQL editor aboard?
Wow I feel stupid. How would I go about getting one?
1 Like
Go to HeidiSQL, that’s the best solution and the most used software nowdays, Although, you can simply go to Strcture in the PhpMyAdmin thingy and you will see edit in the users table where position located, and in Length, change to 255.
Alright. I did it. Let me quickly test.
1 Like
Sure thing, notify me if it works or not
Works like a charm! I appreciate the help, and you will definitely see me around here a lot as I’m not the brightest. Hehe.
2 Likes
You welcome mate, you can ask me whenever you want!
1 Like
scu200
13
Thank you, this method works!
system
Closed
14
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.