I had a loading screen made, but when I try to use it, it derps up, and shows me this: [url]http://gyazo.com/952100844a18950fb11d5e71829df373[/url]
In this loading screen, im trying to get the players steam pic and name to be shown, here is the location of the loading screen: [url]www.unchartedgaming.com/loadingscreen[/url]
but I was told to set the loading screen, I need to make a file and put it in lua/autorun/server . The file is called sv_loadingurl, and contains:
function set_loadingurl_ben()
game.ConsoleCommand("sv_loadingurl http://www.unchartedgaming.com/loadingscreen/index.php?steamid=%s\n")
end
hook.Add( "Initialize", "set_loadingurl_ben", set_loadingurl_ben )
Thanks :)
"but I was told to set the loading screen, I need to make a file and put it in lua/autorun/server"
Who told you this? That's not right.
I needed to do this in order to get the steam name and stuff to work, Ben Chokesonhorse to me this
Just put sv_loadingurl in server.cfg, you don't need a lua file for this.
Yes you do
Why did you ask for help if you're going to argue
Im not arguing, im just telling you, the lua file needs to be there
[QUOTE=robanator1617;41213253]Im not arguing, im just telling you, the lua file needs to be there[/QUOTE]
No, you're wrong.
No it doesn't. You put it in game.cfg or server.cfg as BL00DB4TH had stated. The rest is done within the php page.
If you're not going to take advice and consider that you might just be wrong then why ask in the first place?
Il try -_-
[editline]27th June 2013[/editline]
its bugged
[QUOTE=robanator1617;41212790]The file is called sv_loadingurl, and contains:[/QUOTE]
This is the grave problem. Lua files are to be called [i]something[b].lua[/b][/i].
But as said before, you don't need them in order for the loading screen to function.
I understand that, but srcds is bugged, I need to have it as a function
[QUOTE=robanator1617;41213667]I understand that, but srcds is bugged, I need to have it as a function[/QUOTE]
No, you don't.
Got the same error
Goto server.cfg then just put this in
sv_loadingurl [url]http://www.unchartedgaming.com/loadingscreen/index.php?steamid=%s[/url]
the %s gets replaced by client to a STEAM 64 BIT Hash. which converts to the players data if your loading screen is right.
So just do this and it should work.
Lol you hired Ben Choke as a coder? I had him once and he was possibly the worst coder I met. He calls me stupid and a little incompetent kid that doesn't know anything. The stuff he codes don't even work for me. Loading screens have nothing to do with lua files. All you have to do is specify them in the server.cfg and autoexec.cfg for them to start working.
1. Go to /garrysmod/cfg/server.cfg
2. Add "sv_loadingurl" "http://www.unchartedgaming.com/loadingscreen/"
3. Run server
-snip-
I had this problem when I change my Website host.
It's not a problem with the server...
The port is not allowing GMod to Fetch the page from in-game.
Talk to your website host.
[QUOTE=Sgt. Sicknezz;41245850]I had this problem when I change my Website host.
It's not a problem with the server...
The port is not allowing GMod to Fetch the page from in-game.
Talk to your website host.[/QUOTE]
Try going to the loadingurl set by the Lua script:
[url]http://www.unchartedgaming.com/loadingscreen/index.php?steamid=%s[/url]
the idea is that %s is supposed to be replaced by the SteamID, but if you notice, you get the exact same error as the OP is getting if you go to that URL above, which suggests the loadingURL is not functioning as it's supposed to and %s is not getting replaced. So, the actual fix is to just do what everyone else here has said. Otherwise, the OP can sit here and have a broken loading screen at his own expense.
"the port" is not allowing GMod to fetch the page from in game? GMod uses Awesomium, which to the server just looks like any other web client. And even if there was such a restriction, error 406 "not acceptable" means the server is trying to handle the request, but cannot because a server-side module has errored out for whatever reason. In this case, the reason is that % is a special character used in URL encoding, and %s is not a valid URL encoded string. Quick test:
[url]http://www.unchartedgaming.com/loadingscreen/index.php?steamid=%s[/url]
[url]http://www.unchartedgaming.com/loadingscreen/index.php?steamid=%4E[/url]
(%4E = N)
If it still doesn't work, type sv_loadingurl (nothing after it) in the server console and paste the output here.
Trumple, you have to have the URL in the server cfg with the % stuff. If you use a normal browser, like one used to browse here will not replace them, thus giving an error. Good side will replace it with id64 and map. It is then a valid URL.
[QUOTE=andreblue;41250701]Trumple, you have to have the URL in the server cfg with the % stuff. If you use a normal browser, like one used to browse here will not replace them, thus giving an error. Good side will replace it with id64 and map. It is then a valid URL.[/QUOTE]
[QUOTE=Trumple;41249673]
the idea is that %s is supposed to be replaced by the SteamID, but if you notice, you get the exact same error as the OP is getting if you go to that URL above, which suggests the loadingURL is not functioning as it's supposed to and %s is not getting replaced.[/QUOTE]
[QUOTE=Its Waffles;41245850]I had this problem when I change my Website host.
It's not a problem with the server...
The port is not allowing GMod to Fetch the page from in-game.
Talk to your website host.[/QUOTE]
what port would that be? sorry for reving an old thread but i have this problem
Sorry, you need to Log In to post a reply to this thread.