Players have a different version of the addon than me?
6 replies, posted
Hi all, I'm pretty confused.
So I'm making a weapon, and I uploaded it to my dedicated server to test ( and probably break ).
Now I've added a lot of things, such as a function which displays a cooldown timer that shows on the screen. However, when I went onto a listen server with a friend, only I could see the timer when I used the weapon.
I've made sure the file is AddCSLuaFile'd and such, and I've uploaded the file under a different name on the server. No dice.
Any ideas? If this should be in a different category, I'm sorry.
I hate to bump my own thread, but I really need help. A lot of work has gone into this weapon.
Does anyone have any ideas at all?
Remove the addon from your local directory and re-start Garry's Mod. Do you see the updated version after that?
Are you sure the updated version is on the server?
Sometimes, if there is a syntax error, the old code will be used, that could be the issue; maybe at the rendering area for the cool-down timer.
Suggestions would be all we could give unless you post code.
At the moment I don't really want to release code unless it's super necessary, but here is some more information:
The problem is that when I'm testing it alone on a listen server, everything works perfectly. Then when a friend joins and uses the weapon, they report they don't see the countdown element at all.
Then when I join my dedicated server, I don't even see the timer. So I was thinking it's something to do with the clientside, as I've riddled it with prints and nothing is showing up.
I'm completely sure the updated version is on the server.
The syntax error is what I doubt, because unless the server being dedicated screws things over, the code has no errors.
The code itself is 657 lines in one shared.lua file, could that be it?
My idea is that maybe it's not downloading to the client or something, because that explains how I can use it and no-one else.
This is really weird :v:
I'll go check my code for any more errors, and I'll post back.
Length of code has nothing to do with it. It sounds like it's a networked element which isn't properly networked.
Example: When I first got into Lua in Garry's Mod, I made some weapons for TTT but I didn't network the fire-modes. I did a self.FireMode on the client, and the server... The issue was, it would work locally, but on a dedicated it would do weird things. So, the guns would somewhat function but the prediction wasn't great because other clients wouldn't have the updated vars so they wouldn't know the weapon was firing at times and other strange things such as if the weapon got dropped and a player picked it up, they'd switch the firemodes and because the server was at one value, the client was at a different value, the player may switch it to full auto, whereby if it was full auto before, it would be full auto - 1 landing on either semi, burst or even on safe depending on the weapon which confused players as the text on their screen showed it should work.
In short: You may just be experiencing a networking problem.
Well the weapon does rely on the net library quite a bit so I'll look into it. thanks.
Alright, turns out it was so much easier than I was thinking.
I was relying on convars to enable certain parts, which the client didn't have access to.
It's all good now, so if you find this in the future, check your convars :v:
Sorry, you need to Log In to post a reply to this thread.