I need a Spring.Rehost command! - Page 2

I need a Spring.Rehost command!

Requests for features in the spring code.

Moderator: Moderators

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: I need a Spring.Rehost command!

Post by zwzsg »

It doesn't work for Saktoth. The code is:

Code: Select all

local function ForceModNameAndPort(input)
	output,_=string.gsub(input,"GameType=[^;]*;","GameType="..ModSpecific.ModFileName..";",1)
	output,_=string.gsub(output,"HostPort=[^;]*;","HostPort="..(0)..";",1)
	return output
end

local function DoTheRestart(startscriptfilename)
	Spring.Echo(widget:GetInfo().name..": About to call Spring.Restart(\"-s\",VFS.LoadFile("..startscriptfilename.."))")
	Spring.Echo(widget:GetInfo().name..": that file contains:")
	Spring.Echo(widget:GetInfo().name..": <<BEGIN DUMPING \""..startscriptfilename.."\">>")
	Spring.Echo(ForceModNameAndPort(VFS.LoadFile(startscriptfilename)))
	Spring.Echo(widget:GetInfo().name..": <<END DUMPING \""..startscriptfilename.."\">>")
	Spring.Echo(widget:GetInfo().name..": Ok, calling Spring.Restart(\"-s\",VFS.LoadFile("..startscriptfilename..")) now!")
	Spring.Restart("-s",ForceModNameAndPort(VFS.LoadFile(startscriptfilename)))
	Spring.Echo(widget:GetInfo().name..": Just called Spring.Restart(\"-s\",VFS.LoadFile("..startscriptfilename.."))")
	Spring.Echo(widget:GetInfo().name..": Wait, we shouldn't be here, should have restarted or crashed or quitted by now.")
end
So as you can see, I used "-s" as first argument. The infolog is: http://pastebin.com/m6e46e7f0
That infolog shows the startscript was correctly written, and contains correct information. Saktoth told me the file Kernel_Panic_script.txt was in his Spring folder, and that drag'n'dropping it over Spring.exe worked.





Edit: MidKnight got same issue: http://pastebin.com/d3cde9a3d

Script is correct, Spring.Restart is called, and then Spring close but does not restart. There's not much I can do. Need your help Auswaschbar!
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Bump!

Post by zwzsg »

I found what the issue is:
(Mantised)

Spring.Restart fails when there's spaces in the path to Spring.exe


I tried the following, on same computer, same session etc...
- Installing to D:\Stuff\KP\Spring Kernel Panic
- Spring.Restart fails!
- Installing to D:\Stuff\KP\Spring_Kernel_Panic
- Spring.Restart works!
Post Reply

Return to “Feature Requests”