Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't equip items #196

Open
BenitoTV opened this issue Dec 25, 2023 · 2 comments
Open

Can't equip items #196

BenitoTV opened this issue Dec 25, 2023 · 2 comments

Comments

@BenitoTV
Copy link

Hey there,

unfortunately, players can't equip items to their Model, Trail, Hat or Accessory slots.
This issue first occured after the latest big TTT2 update, we use Pointshop on our TTT server.

This is our collection: https://steamcommunity.com/sharedfiles/filedetails/?id=2791902327 (there are sub-collections with some little server addons and maps)

This is the lua error from the console when equipping a new playermodel:

L 12/25/2023 - 21:13:06: Lua Error:
        addons/libk/lua/libk/server/sv_libk_database.lua:171: attempt to call local 'callback' (a table value)
                 1: Query (sqlText = "UPDATE `kinv_items` SET  `itemclass` = 'KInventory.Items.91',`data` = '{\"purchaseData\":{\"amount\":0.0,\"time\":1702416149.0,\"currency\":\"points\",\"origin\":\"LUA\"}}',`itempersistence_id` = '91',`inventory_id` = NULL WHERE `id` = '119'", callback = _R._LOADED.team:callback, errorCallback = function (error), blocking = nil) [addons/libk/lua/libk/server/sv_libk_database.lua: 171]
                 2: add (self = { _R._LOADED.team:LibK.TransactionSqlite.__instanceDict: 0xe9e84c72 }, sqlText = "UPDATE `kinv_items` SET  `itemclass` = 'KInventory.Items.91',`data` = '{\"purchaseData\":{\"amount\":0.0,\"time\":1702416149.0,\"currency\":\"points\",\"origin\":\"LUA\"}}',`itempersistence_id` = '91',`inventory_id` = NULL WHERE `id` = '119'") [addons/libk/lua/libk/server/sv_database_transaction.lua: 77]
                 3: s (slot = { _R._LOADED.team:Pointshop2.EquipmentSlot.__ins
        addons/libk/lua/libk/server/sv_libk_database.lua:171: attempt to call local 'callback' (a table value)
                 1: Query (sqlText = "UPDATE `kinv_items` SET  `itemclass` = 'KInventory.Items.91',`data` = '{\"purchaseData\":{\"amount\":0.0,\"time\":1702416149.0,\"currency\":\"points\",\"origin\":\"LUA\"}}',`itempersistence_id` = '91',`inventory_id` = NULL WHERE `id` = '119'", callback = _R._LOADED.team:callback, errorCallback = function (error), blocking = nil) [addons/libk/lua/libk/server/sv_libk_database.lua: 171]
                 2: add (self = { _R._LOADED.team:LibK.TransactionSqlite.__instanceDict: 0xe9e84c72 }, sqlText = "UPDATE `kinv_items` SET  `itemclass` = 'KInventory.Items.91',`data` = '{\"purchaseData\":{\"amount\":0.0,\"time\":1702416149.0,\"currency\":\"points\",\"origin\":\"LUA\"}}',`itempersistence_id` = '91',`inventory_id` = NULL WHERE `id` = '119'") [addons/libk/lua/libk/server/sv_database_transaction.lua: 77]
                 3: s (slot = { _R._LOADED.team:Pointshop2.EquipmentSlot.__instanceDict: 0xebb9feea }) [addons/poiLUA Error in Controller Pointshop2Controller action equipItem:

nil

And maybe it's also worth mentioning, that when I join the server, I get this error in the chat:
Bild_2023-12-25_212440928

@BenitoTV
Copy link
Author

The error when joining the server is fixed with removing the First-Person Body addon. But the issue with pointshop still persists

@ValentinFunk
Copy link
Owner

Looks like some code (TTT2 perhaps since you mentioned the update?) is using callback as a global variable which breaks any scripts trying to use that name. Not really anything I can do here - it needs to be fixed in the other addon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants