TTT-2 / TTT2

Trouble in Terrorist Town 2 for Garry's Mod (gmod)
https://steamcommunity.com/sharedfiles/filedetails/?id=1357204556
179 stars 78 forks source link

Can't equip Pointshop2 items #1270

Closed BenitoTV closed 11 months ago

BenitoTV commented 11 months ago

Your version of TTT2 (mandatory)

Workshop version from steam: v0.12.2b

Describe the bug (mandatory)

When a player tries to equip any item from the Pointshop (Hat, Trail, Playermodel, anything), a pop-up appears that says that the item couldn't be equipped because of a lua error. This problem is present since the latest big update (I think it was v0.12.1b). I already opened an issue on the github of Pointshop2, but the creator said the following:

"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"

So I hope I find a solution here.

To reproduce

Steps to reproduce the behaviour:

  1. Open the Pointshop2 menu with the F3 key
  2. Buy an item in the "Shop" tab
  3. Equip the item in the "Inventory" tab
  4. See the error in the console

Expected behaviour

The item should be equipped and visible to other players, without an error pop-up.

Context (please provide as much as you can)

nil



- Other addons installed in your servers `addons` folder: Pointshop2, PAC3, LibK
- Screenshot: 
![image](https://github.com/TTT-2/TTT2/assets/111009199/d966a1f6-a86c-4699-89a5-560b66056786)
PunishMints commented 11 months ago

I'm having the same issue with a brand new server I started up almost a week ago. I also have Pointshop2, PAC3, and LibK installed in the addons folder along with some Pointshop 2 DLC (Acheivements, Betting, Trading, Boosters, Gambling, Drops, and PermaWeapons)

Here is the link to my collection.

Histalek commented 11 months ago

Thank you for reporting this!

This was fixed in #1261 but is not released to the workshop yet. We plan on making a release in the next few days.

For now the workaround would be to download the master branch from github and place it into the /garrysmod/addons/ directory. If you are on Linux make sure the directory is in lowercase e.g. ttt2 as otherwise garrysmod won't recognize it.

I'll close this Issue as completed, but will pin it for the time being.

Histalek commented 10 months ago

Update v0.12.3b is now released on the workshop and contains the fix for this issue :)