Weapon inventory problem

no changes and latest essentialmode. 6.2.1 I’ll keep trying to figure this out.

1 Like

Sorry for late response. Hm the thing is, we are using an older version of essentialmode and basically just added some stuff from 6.2 :smiley: idk if this fixed it or what in the end actually did. But I only remember the following things we looked at: esx_ambulancejob, esx_weaponshop and essentialmode aswell as Database. The thing is, if you think about it, that the Weapons are saved in the Database but arent LOADED with ammo or loaded at all. Cant help you much more than this, sorry!

1 Like

what database tables are required for weaponshop? I get an error about a nil table. I’ve followed instructions on importing the SQL. I imported weashops first, then weaponshop. no dice. first time did weapon shop then weashops. same thing.

Can’t follow your thoughts there. Send me the error code

Error running call reference function for resource esx_weashops: citizen:/scripting/lua/scheduler.lua:405: @esx_weashops/server/main.lua:47: table index is nil
stack traceback:
@esx_weashops/server/main.lua:47: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
Error: Unhandled error in timer: Error: BUFFER_SHORTAGE
Error: BUFFER_SHORTAGE
at n.e [as reserve] (citizen:/scripting/v8/msgpack.js:29:12766)
at h (citizen:/scripting/v8/msgpack.js:29:15761)
at n.r [as decode] (citizen:/scripting/v8/msgpack.js:29:13908)
at n.fetch (citizen:/scripting/v8/msgpack.js:29:6972)
at n.u [as read] (citizen:/scripting/v8/msgpack.js:29:12076)
at Object.n [as decode] (citizen:/scripting/v8/msgpack.js:29:7097)
at unpack (citizen:/scripting/v8/main.js:20:33)
at citizen:/scripting/v8/main.js:51:20
at setImmediate (mysql-async.js:5138:9)
at Object.callback (citizen:/scripting/v8/timer.js:96:21)

zero errors upon server start. Happens upon login of my character as he has a loadout/weapon license. if people don’t have a gun or weashop item they don’t error message.

where does this get installed? I wonder if this would solve my issue here.

You gotta try if that works. So, I get similar problems with citizen. But: you mysql also has problems. What could help here: completely redo the database. Regarding your weapon.lua, I’d need the line that is mentioned here and see whats in there. that’d be: server/main.lua:47 and the citizen:/scripting/lua/scheduler.lua:405 Whats in there? send it here

1 Like

the TriggerEvent should be either in the esx_ambulancejob / clothingshop or extended somewhere

yes I’ve noticed when I run sql to link into DB they sometimes error and don’t create the entire table base. I’ve wiped the database a few times. Last night I did after our first convo-part. it added the ‘zone’ into it that time. Zero loading errors for server upon startup. just wiped my character line entirely and still got that error when I got logged in.

pewh. Let me check something real quick… es_extended/server/main.lua line 258-268 do you have this in there:
TriggerEvent(‘esx:playerLoaded’, _source)

    TriggerClientEvent('esx:playerLoaded', _source, {
      identifier   = xPlayer.identifier,
      accounts     = xPlayer.getAccounts(),
      inventory    = xPlayer.getInventory(),
      job          = xPlayer.getJob(),
      loadout      = xPlayer.getLoadout(),
      lastPosition = xPlayer.getLastPosition(),
      money        = xPlayer.get('money')
    })
1 Like

yes, that’s in there. I manually edited my SQL DB to be correct so no more errors for that. I now have gun listings in both weashops(for ammo mag) and weaponshop. not entirely sure which one to go about using. can I get rid of esx_weaponshop if I have weashop with clip? still no guns working from store either way you purchase them.

I have no idea man sorry

thanks for trying. appreciate it.

It will but there us a hair texture issue also. Are you getting green / pink hair after being revived?

I haven’t officially been revived by an ems with a medkit. only /revive cmds. no hair or clothing issues.

1 Like

https://www.youtube.com/watch?v=mBqMPT2skFo This is the issue I have yet to solve. I figured out the database errors and have solved those via manual edit of database.
The video is also listed on github under issues.

checked F8 console and read up the list. discovered extended had an error at a line. turns out I deleted a line spacing I shouldn’t have when I implemented inventoryHUD2 with vehicle inventory. it messed up a lot of stuff. All of which is working!

ps. I had no idea clientF8 console was helpful for dev.

Well the F8 console gives you the same informations as the (if you use this as programm) Putty list. Did you solve your problem now?

yes I solved my problem. It was a an error in deletion of some code for es extended. F8 console shows client errors, RCON shows server side errors. Or so it would seem. I’m not 100%