Ok, so anyone have any workarounds for the GetConVarString/Number? I have already tried replacing with the appropriate GetConVar, ConVar:GetInt, etc and all the ones that shouldnt work. I am continuously getting "attempt to index global ConVar (a nil value) errors, when none of the ConVar's should be errors. Specific example here:
The Line erroring out:
if RoundActive and ConVar:GetInt("has_timelimit") < 1 then
Convars at the top:
if not ConVarExists("has_seekoncaught") then CreateConVar("has_seekoncaught","1",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_timelimit") then CreateConVar("has_timelimit","180",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_minplayers") then CreateConVar("has_minplayers","2",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_maxrounds") then CreateConVar("has_maxrounds","12",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_infinitestamina") then CreateConVar("has_infinitestamina","0",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_choosetype") then CreateConVar("has_choosetype","0",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_envdmgallowed") then CreateConVar("has_envdmgallowed","1",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_lasttrail") then CreateConVar("has_lasttrail","1",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
As for the line erroring out, I have tried both GetConVar and the ConVar:GetInt.
I honestly hate asking for help, but I dont have much coding experience and I cant just use the actual value of the convar in place of the convar command.
Thanks in Advance
[QUOTE=Assassin2142;49333085]Ok, so anyone have any workarounds for the GetConVarString/Number? I have already tried replacing with the appropriate GetConVar, ConVar:GetInt, etc and all the ones that shouldnt work. I am continuously getting "attempt to index global ConVar (a nil value) errors, when none of the ConVar's should be errors. Specific example here:
The Line erroring out:
if RoundActive and ConVar:GetInt("has_timelimit") < 1 then
Convars at the top:
if not ConVarExists("has_seekoncaught") then CreateConVar("has_seekoncaught","1",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_timelimit") then CreateConVar("has_timelimit","180",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_minplayers") then CreateConVar("has_minplayers","2",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_maxrounds") then CreateConVar("has_maxrounds","12",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_infinitestamina") then CreateConVar("has_infinitestamina","0",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_choosetype") then CreateConVar("has_choosetype","0",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_envdmgallowed") then CreateConVar("has_envdmgallowed","1",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
if not ConVarExists("has_lasttrail") then CreateConVar("has_lasttrail","1",{FCVAR_REPLICATED,FCVAR_SERVER_CAN_EXECUTE,FCVAR_ARCHIVE}) end
As for the line erroring out, I have tried both GetConVar and the ConVar:GetInt.
I honestly hate asking for help, but I dont have much coding experience and I cant just use the actual value of the convar in place of the convar command.
Thanks in Advance[/QUOTE]
What error do you get when using GetConVarNumber?
[QUOTE=Robotboy655;49332970][t]http://i.imgur.com/4qetCQf.jpg[/t]
It's a problem on your side.[/QUOTE]
Never said its a problem, however this was introduced by this update, it can be triggered by running ahead of barney and waiting infront of the door when he pushes his way thru he becomes invisible.
EDIT: Looks like this is a actual issue with each NPC that runs thru me.
[IMG]http://images.akamai.steamusercontent.com/ugc/580200899494093270/61CF57AD345A5A4BCCE4A92804B9BA4044AF5E6A/[/IMG]
[img]http://images.akamai.steamusercontent.com/ugc/580200899494093837/3FAF87B0BFCE43982FC8C61F0585E76E413B828A/[/img]
Also my install is clean, I wiped all of gmod and downloaded it all over, no addons subscribed whatsoever.
[QUOTE=Willox;49333100]What error do you get when using GetConVarNumber?[/QUOTE]
It gives me:
attempt to call global 'GetConVarNumber' a (nil value)
Which kind of makes sense, but doesnt. It said the GetConVarNumber was moved to Lua but it sure seems like they just dicked with convars...
[QUOTE=Assassin2142;49333169]It gives me:
attempt to call global 'GetConVarNumber' a (nil value)
Which kind of makes sense, but doesnt. It said the GetConVarNumber was moved to Lua but it sure seems like they just dicked with convars...[/QUOTE]
Have you got any anti-cheats installed?
[QUOTE=Assassin2142;49333169]It gives me:
attempt to call global 'GetConVarNumber' a (nil value)
Which kind of makes sense, but doesnt. It said the GetConVarNumber was moved to Lua but it sure seems like they just dicked with convars...[/QUOTE]
GetConVar Is the function you're looking for, not ConVar. Here is proper usage of the function:
[lua]
local sv_cheats = GetConVar("sv_cheats") -- store sv_cheats for later use so we don't have to constantly retrieve it
if sv_cheats:GetBool() then
print("Cheats are active!")
else
print("Cheats are not active.")
end
[/lua]
Alternative, if you're making the convars yourself:
[lua]
local mycoolconvar = CreateConVar(blah blah blah)
function printvalue()
print("The number of mycoolconvar is", mycoolconvar:GetInt())
end
[/lua]
[QUOTE=Willox;49333178]Have you got any anti-cheats installed?[/QUOTE]
Nope. No Anticheats. Its just a fairly basic server, this particular file is part of the hide and seek gamemode. Just ULX, Map voting, pointshop.
[editline]16th December 2015[/editline]
[QUOTE=zerf;49333189]GetConVar Is the function you're looking for, not ConVar. Here is proper usage of the function:
[lua]
local sv_cheats = GetConVar("sv_cheats") -- store sv_cheats for later use so we don't have to constantly retrieve it
if sv_cheats:GetBool() then
print("Cheats are active!")
else
print("Cheats are not active.")
end
[/lua]
Alternative, if you're making the convars yourself:
[lua]
local mycoolconvar = CreateConVar(blah blah blah)
function printvalue()
print("The number of mycoolconvar is", mycoolconvar:GetInt())
end
[/lua][/QUOTE]
I already attempted that. In Running with GetConVar again, I got this error:
attempt to compare userdata with number
[QUOTE=Jerpy;49330810]Is anyone having issues with sv_setsteamaccount? I've tried putting it in startup command line, server.cfg, autoexec.cfg, and every time it says "No account token specified; logging into anonymous game server account." and then tells me to use sv_setsteamaccount.[/QUOTE]
Set it as a launch option:
+sv_setsteamaccount <key>
[QUOTE=Assassin2142;49333197]Nope. No Anticheats. Its just a fairly basic server, this particular file is part of the hide and seek gamemode. Just ULX, Map voting, pointshop.
[editline]16th December 2015[/editline]
I already attempted that. In Running with GetConVar again, I got this error:
attempt to compare userdata with number[/QUOTE]
GetConVar("whatever"):GetInt()
Thanks for unicode support!
[img]http://i.imgur.com/O984NEf.png[/img]
[sp]It was worse before[/sp]
[QUOTE=Assassin2142;49333197]I already attempted that. In Running with GetConVar again, I got this error:
attempt to compare userdata with number[/QUOTE]
your problem is that
[lua]
local myvar = GetConVar("blah")
print(myvar < 5)
[/lua]
should be
[lua]
local myvar = GetConVar("blah")
print(myvar:GetInt() < 5)
[/lua]
[QUOTE=Jerpy;49330810]Is anyone having issues with sv_setsteamaccount? I've tried putting it in startup command line, server.cfg, autoexec.cfg, and every time it says "No account token specified; logging into anonymous game server account." and then tells me to use sv_setsteamaccount.[/QUOTE]
Is sv_setsteamaccount required? What's it used for?
[QUOTE=thegrb93;49335359]Is sv_setsteamaccount required? What's it used for?[/QUOTE]
Gives a server a static steamid, allows user to track it in their favorites when the server changes IP, it's not required but it helps.
Ah ok. Thanks.
Anyone got a list/type of popular addons that my be conflicting with the new update?
Players were reporting that they stuck in "Retrieveing Server Info...". Could this have something to do with sv_setsteamaccount or the new update in general?
Update: Sorry, it was "Parsing game info...". A server restart + updating my anticheat solved the problem.
Update 2: Well, it only solved the issue for a few minutes...
Update 3: Seems to be fixed. It was an issue with sv_setsteamaccount, like expected.
[QUOTE=P4sca1;49335895]Players were reporting that they stuck in "Retrieving server info". Could this have something to do with sv_setsteamaccount or the new update in general?[/QUOTE]
[code]
21:01 - Python1320: best gmod update
21:01 - Python1320: wait until next steam downtime
21:01 - Python1320: you're going to see some serious shit
21:01 - Chewgum: like what
21:01 - Python1320: like no one being able to join the server
21:01 - Python1320: while steam's down
21:02 - Chewgum: becauwe why
21:02 - Python1320: because of exploit fix
21:02 - Chewgum: oh
21:02 - Python1320: the server waits for confirmation from valve before it lets you get in
21:02 - Chewgum: lol
21:02 - Python1320: not even loading screen is networked before that
[/code]
[QUOTE=wamo;49335721]Anyone got a list/type of popular addons that my be conflicting with the new update?[/QUOTE]
I don't think anything really changed that would break many addons
[QUOTE=_Chewgum;49335923][code]
21:01 - Python1320: best gmod update
21:01 - Python1320: wait until next steam downtime
21:01 - Python1320: you're going to see some serious shit
21:01 - Chewgum: like what
21:01 - Python1320: like no one being able to join the server
21:01 - Python1320: while steam's down
21:02 - Chewgum: becauwe why
21:02 - Python1320: because of exploit fix
21:02 - Chewgum: oh
21:02 - Python1320: the server waits for confirmation from valve before it lets you get in
21:02 - Chewgum: lol
21:02 - Python1320: not even loading screen is networked before that
[/code][/QUOTE]
To be fair, most steam downtimes are less than 10 minutes.
Players who are ingame already won't have any problems.
If it's really such a severe issue, which it doesn't seem to be, a check could be performed to allow joining while the steam servers are down.
Edit: Since people don't believe that it's usually 10 minutes, [url]https://www.issteamdown.com/[/url] :v
[QUOTE=Leystryku;49336081]To be fair, most steam downtimes are less than 10 minutes.
Players who are ingame already won't have any problems.
If it's really such a severe issue, which it doesn't seem to be, a check could be performed to allow joining while the steam servers are down.[/QUOTE]
Maybe a concomand to disable it (as a temporary fix before we found better solution).
Something like sv_steamvaliditycheck by default at 1, and we can set it to 0 while steam servers are down.
Like sv_password
[QUOTE=guigui;49336095]Maybe a concomand to disable it (as a temporary fix before we found better solution).
Something like sv_steamvaliditycheck by default at 1, and we can set it to 0 while steam servers are down.
Like sv_password[/QUOTE]
A convar would require the users to be monitoring the server whenever steam is down.
While the check for steam servers being down would be performed automatically.
[QUOTE=Leystryku;49336100]A convar would require the users to be monitoring the server whenever steam is down.
While the check for steam servers being down would be performed automatically.[/QUOTE]
Your solution is better ofc, but like sv_secure and sv_allowcslua, we need a way to disable it in case the "auto check" fail.
Can someone explain how to use sv_steamaccount pls.
Has anyone noticed a drop in player counts on their servers ect since the update?
I'm still seeing [b]A LOT[/b] of players (most likely 10 year olds) still complaining that they can't launch gmod ect because of the virus nonsense.
People have also been talking about random coughing noises on servers, so I don't know what that's about either.
[QUOTE=YourStalker;49336217]Can someone explain how to use sv_steamaccount pls.[/QUOTE]
Go here [url]https://steamcommunity.com/dev/managegameservers[/url]
Create a profile for each of your servers and then add the token it gives you for the server to your startup commands or cfg file.
[QUOTE=YourStalker;49336217]Can someone explain how to use sv_steamaccount pls.[/QUOTE]
Special for you:
[url]http://wiki.garrysmod.com/page/Steam_Game_Server_Accounts[/url]
[QUOTE=guigui;49336109]Your solution is better ofc, but like sv_secure and sv_allowcslua, we need a way to disable it in case the "auto check" fail.[/QUOTE]
Well really it's people being able to bypass every ban you throw at them vs people being unable to join when the steam auth servers are down ( not just any steam server ).
There would easily be people misusing the convars.
A better solution than a convar JUST as backup in case people don't mind steamid spoofing or maybe want cracked players, would be checking the -insecure flag.
However, the automatic method should still be preferable.
[CODE]
WARNING: Failed to load 32-bit libtinfo.so.5 or libncurses.so.5.
Please install (lib32tinfo5 / ncurses-libs.i686 / equivalent) to enable readline.
[/CODE]
Is this because of my system or because of GMod? OS: Linux Debian 8.1
(It is just since the last update)
tostring(player:SteamID64()) errors about how the first argument of tostring must be a value...
[QUOTE=Robotboy655;49329756]For multiplayer it is already the maximum numer - 8192 - the maximum amount of strings in a string table.[/QUOTE]
By string table are you referring to INetworkStringTable?
[QUOTE=Conna;49336900]tostring(player:SteamID64()) errors about how the first argument of tostring must be a value...[/QUOTE]
I was able to reproduce this in single-player calling as the server, still works in a listen or dedicated server or calling as a client in single-player.
Sorry, you need to Log In to post a reply to this thread.