sv_loadingurl not working properly

Hello Facepunch,

my sv_loadingurl doesn’t seem to work at all.
I have only 2 servers, but on both it fails to load upon player joining. ‘before’, it worked fine, but only popped up when the client reached “Sending Client Info”, but right now it’s not showing up at all.
I don’t have access to my commandline due NFOServers, but this shouldn’t be a problem, I think.
I added the following line to my autoexec.cfg:
sv_loadingurl “http://casualbananas.com/loadingscreens/excl/index.php
Maybe it has something to do with adding or removing http:// or www., I don’t know, but I can’t get it to work.

Don’t forward me to google or the wiki, I tried several times, searched google for hours.

Ruben

Does same for me ever since that HTML Panel fuckup thing. Even tho I’m sure that garry fixed it.

Good to know I’m not the only one.

It also used to do this for me around 6 months ago. But I fixed it that time by using a script that changes map on server startup and for some reason that fixed it.

I should give that a shot. Any chance you have that script?

I don’t have that exact script but I can write one up quickly now
[lua]
hook.Add(“Initialize”, “FixLoading”, function()
local c_map = “gm_construct”
if game.GetMap() == “gm_flatgrass” then
game.ConsoleCommand("changelevel "…c_map)
end
end)
[/lua]
Change gm_construct to the map you want your server on and make the server startup on flatgrass by default

Thanks for that. Should work.
I’ll just post it here if it works.

Excuse me, where do I exactly put this file? I suppose lua/autorun/server?
I’m not sure.

Yeah you can put in autorun/server or in a serverside gamemode file

I tested the code, I put it in lua/autorun/server/changelevel.lua.
After setting the default map to gm_flatgrass and adjusted the settings so it’d change to rp_evocity_v33x, it didn’t fix the problem and stood on gm_flatgrass instead of rp_evocity_v33x.
I also ran a websync, just to be sure. Then restarted again, but didn’t help either. This is strange.

Edit:
Unsuccessful attempt to add the code to DarkRP’s init.lua.

EDIT2:
Google’d the <game.RunConsoleCommand("changelevel > string, and found out that you forgot to put a
at the end of the console command forcing it to not work.

Try just putting it in lua/autorun/server

Google’d the <game.RunConsoleCommand("changelevel > string, and found out that you forgot to put a
at the end of the console command forcing it to not work.

It wasn’t me, but the code :slight_smile:

[editline]1st August 2012[/editline]

Nope, still not working after putting this.

[lua]hook.Add(“Initialize”, “FixLoading”, function()
local c_map = “rp_evocity_v33x”
if game.GetMap() == “gm_flatgrass” then
game.ConsoleCommand("changelevel "…c_map … "
")
end
end)[/lua]

Glad you found a fix, wrote it on the spot and didn’t test it so errors can be expected

[editline]1st August 2012[/editline]

Is it still giving you a lua error? Or is the loading screen just not working

It’s not changing map in general.

Try this:
[lua]
hook.Add(“Think”, “FixLoading”, function()
local c_map = “rp_evocity_v33x”
if game.GetMap() == “gm_flatgrass” then
game.ConsoleCommand("changelevel "…c_map … "
")
end
end)
[/lua]

The code works fine, it changes map. But it doesn’t make the loading URL work.

But I seem to get these errors in console:


Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121
Browser Message: Uncaught TypeError: Cannot set property 'innerHTML' of null - http://casualbananas.com/loadingscreens/excl/index.php:121

I don’t know if Garry or anyone did something, but all of a sudden mine has started working.

Sorry if this is an old thread, but it looks like Cyberuben haven’t solved the problem.

Anyways, the solution is to remove “http://” from the sv_loadingurl.