Progress in 717:
Spring.Restart(" ",VFS.LoadFile("MyScript.txt")) still works
Spring.Restart("",VFS.LoadFile("MyScript.txt")) now works
Spring.Restart("-w",VFS.LoadFile("MyScript.txt")) works and change game to windowed
Spring.Restart("MyScript.txt", "") works
Spring.Restart("MyScript.txt") does not work (Incorrect arguments to Restart(arguments, script)) but that should soon change.
I need a Spring.Rehost command!
Moderator: Moderators
Re: I need a Spring.Rehost command!
Okay, appears it is bugged on some machine.
I use:
Spring.Restart(" ",VFS.LoadFile(MissionFileName))
Where MissionFileName is the name of a .txt inside the mod archive.
Still zipped, not extracted locally. Though, that does not matter, since, for skirmish, I use Spring.Restart(" ",VFS.LoadFile(ModSpecific.ScriptFileName)) where this time the file has been previously written in Spring root folder, and Dotz reported it suffer from same problem.
To replicate (or not, works for me, failed for my first two testers), get the mod KP3.6 ( http://jobjol.nl/1685 ) the map Spooler Buffer ( http://springfiles.com/645 ), Run Spring.exe directly, pick KP3.6 mod whatever map whatever startscript (that doesn't outright crash), then the green KP menu trigger, click campaign, click "herd and pick".
Wanted behavior: Spring should close and reopen and load the mission. (two dark blue allied minifactory, 10 blue bit that turn green after couple second, ...)
Observed behavior: Spring close and does not relaunch.
On my PC, Win2000, everything works fine. I noticed the script of the mission is stored in _script.txt
What Dotz (WinXP) and Godde (Vista) reported was that, Spring closed, no error message, but did not relaunch.
On Dotz PC, where Spring.Restart close Spring but doesn't relaunch it, it appears _script.txt contains the startscript of the game in which Spring.Restart() was executed (that is, http://pastebin.com/f25755f03 what you get when Spring.exe direct launched), while the description of the wanted new game is saved under script.txt (that is, http://pastebin.com/f2f7ed0c, my mission). Manually drag and dropping that script.txt over Spring.exe makes the mission works.
I use:
Spring.Restart(" ",VFS.LoadFile(MissionFileName))
Where MissionFileName is the name of a .txt inside the mod archive.
Still zipped, not extracted locally. Though, that does not matter, since, for skirmish, I use Spring.Restart(" ",VFS.LoadFile(ModSpecific.ScriptFileName)) where this time the file has been previously written in Spring root folder, and Dotz reported it suffer from same problem.
To replicate (or not, works for me, failed for my first two testers), get the mod KP3.6 ( http://jobjol.nl/1685 ) the map Spooler Buffer ( http://springfiles.com/645 ), Run Spring.exe directly, pick KP3.6 mod whatever map whatever startscript (that doesn't outright crash), then the green KP menu trigger, click campaign, click "herd and pick".
Wanted behavior: Spring should close and reopen and load the mission. (two dark blue allied minifactory, 10 blue bit that turn green after couple second, ...)
Observed behavior: Spring close and does not relaunch.
On my PC, Win2000, everything works fine. I noticed the script of the mission is stored in _script.txt
What Dotz (WinXP) and Godde (Vista) reported was that, Spring closed, no error message, but did not relaunch.
On Dotz PC, where Spring.Restart close Spring but doesn't relaunch it, it appears _script.txt contains the startscript of the game in which Spring.Restart() was executed (that is, http://pastebin.com/f25755f03 what you get when Spring.exe direct launched), while the description of the wanted new game is saved under script.txt (that is, http://pastebin.com/f2f7ed0c, my mission). Manually drag and dropping that script.txt over Spring.exe makes the mission works.
[23:11] * zwzsg has quit IRC (Quit)
[23:18] * Dotz has joined #kp
[23:29] <zwzsg[IRC]> Have you tried the "herd and pick" mission Dotz?
[23:31] <Dotz> not yet
[23:34] <zwzsg[IRC]> Running an existing mission would be the first into getting accustomed to the mission system and its possibility.
[23:37] <Dotz> ...
[23:38] <Dotz> so how do you get to the missions anyway?
[23:39] <zwzsg[IRC]> Run Spring.exe directly
[23:39] <Dotz> oh
[23:39] <zwzsg[IRC]> double click Spring.exe, not using any lobby
[23:40] * Dotz has quit IRC (Quit)
[23:46] * Dotz has joined #kp
[23:46] <Dotz> they don't work
[23:47] <Dotz> hello?
[23:47] <Dotz> the missions don't work
[23:50] <zwzsg[IRC]> Don't work.
[23:50] <zwzsg[IRC]> Can you describe what you did and what happened?
[23:51] <zwzsg[IRC]> http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
[23:52] <Dotz> erm... all I did was set the mod, map, script (tried commanders and test script) and clicked 'test spring' and it went to the mission menu. I clicked on a mission, and it crashed
[23:52] * lixed has joined #kp
[23:52] <zwzsg[IRC]> crashed, ok
[23:52] <zwzsg[IRC]> any errorbox?
[23:53] <Dotz> no
[23:53] <zwzsg[IRC]> anything in infolog?
[23:53] <Dotz> I would have stated that
[23:53] <Dotz> [ 0] LuaUI::RunCallIn: error = 2, DrawScreen, [string "LuaUI/widgets.lua"]:1184: attempt to index local 'w' (a nil value)
[23:53] <zwzsg[IRC]> hmm, ok, that's actually normal. It's just the single player launcher killing every other widget a bit brutally
[23:53] * [SOL]HughMann[NOTA] has joined #kp
[23:53] <Dotz> lol
[23:54] * lixed has quit IRC (Quit)
[23:54] <zwzsg[IRC]> So, you click a mission, and then? Spring close? Spring crash?
[23:54] <Dotz> crash and close without warning are the same thing
[23:54] * [SOL]HughMann[NOTA] has quit IRC (Quit)
[23:54] <zwzsg[IRC]> ah
[23:55] <zwzsg[IRC]> Do you have a _script.txt (with the _) in your Spring folder?
[23:55] <Dotz> yes
[23:56] <zwzsg[IRC]> Open it
[23:56] <Dotz> and?
[23:56] <zwzsg[IRC]> It should read: \\ To run this script, drag and drop over spring.exe
[23:56] <zwzsg[IRC]> Do that and see if this time Spring accepts to run it
[23:56] <Dotz> it doesn't say that
[23:57] <Dotz> its just a small script
[23:57] <zwzsg[IRC]> What's inside it?
[23:57] <Dotz> not much of anything
[23:57] <zwzsg[IRC]> http://pastebin.com/
[23:57] <Dotz> it just says stuff about the last game in Spring.exe
[23:57] <zwzsg[IRC]> Can you still pastebin it?
[23:58] <Dotz> do you mean Kernel_Panic_script?
[23:58] <zwzsg[IRC]> No
[23:58] <zwzsg[IRC]> I mean: _script.txt
[23:58] <zwzsg[IRC]> with a _
[23:58] <Dotz> hm...
[23:58] <zwzsg[IRC]> "_script.txt"
[23:58] <zwzsg[IRC]> Say, you run windows, right?
[23:59] <Dotz> http://pastebin.com/f25755f03
[23:59] <zwzsg[IRC]> Ok
Session Time: Mon Aug 24 00:00:00 2009
[00:00] <Dotz> you want script.txt
[00:00] <zwzsg[IRC]> no no
[00:00] <Dotz> not _script.txt
[00:00] <Dotz> yes yes
[00:00] <zwzsg[IRC]> I wanted _script.txt
[00:00] <Dotz> no
[00:00] <Dotz> what you asked for is in script.txt
[00:01] <zwzsg[IRC]> Btw, does the skirmish menu just above missin work?
[00:01] <Dotz> idk
[00:01] <zwzsg[IRC]> Can you try?
[00:02] <Dotz> but since what should be in _script is in script.txt...
[00:02] <zwzsg[IRC]> What's in script.txt?
[00:02] <zwzsg[IRC]> pastebing script.txt then
[00:03] <Dotz> http://pastebin.com/f2f7ed0c
[00:04] <zwzsg[IRC]> That is indeed the mission script!!
[00:04] <Dotz> see?
[00:04] <zwzsg[IRC]> I'm confused, in my PC, the mission script is in the _ one
[00:04] <zwzsg[IRC]> anyway, what happens when you drag and drop that http://pastebin.com/f2f7ed0c into Spring.exe?
[00:05] <Dotz> it works
[00:05] <Dotz> but it went to skirmish I think
[00:05] <Dotz> probably cause I just tried to test it
[00:06] <zwzsg[IRC]> Well, the mission "herd and pick" should place you in the map Spooler buffer, give you no kernel, but two allied socket, and blue bit that turn green after a couple seconds
[00:06] <zwzsg[IRC]> 10 blue bits or so
[00:07] <zwzsg[IRC]> Theorically, dragging http://pastebin.com/f2f7ed0c over Spring.exe should run that mission.
[00:10] <Dotz> the can't cross the streams anymore in heavy divide
[00:10] <zwzsg[IRC]> What? You got it working or what?
[00:11] <zwzsg[IRC]> Yeah, looks like the acid damage formula got changed, but anyway, that's not the issue now. Now the issue is finding what is wrong with the mission launcher.
[00:11] <Dotz> you can't use it in spring.exe
[00:12] <Dotz> it tries to launch test script or whatever
[00:12] <Dotz> and it gets confused between that and the map you chose as well
[00:12] <zwzsg[IRC]> Can you say that again with less "it" and more precision?
[00:13] <Dotz> and what were we just talking about?
[00:13] <zwzsg[IRC]> Is the mission txt always extracted to your Spring folder, and under which filename?
[00:13] <Dotz> THE MISSION LAUNCHER
[00:14] <Dotz> however, you do need to run spring.exe for it to write the new mission file
[00:14] <Dotz> which is script
[00:16] <zwzsg[IRC]> Hmm, like, the first time you pick a mission, the mission.txt is not written under any name in Spring folder?
[00:16] <zwzsg[IRC]> And you run Spring.exe again, and then the mission from last time appears out of nowhere?
[00:19] <Dotz> what?
[00:19] <Dotz> idk
[00:19] <zwzsg[IRC]> I'm trying to understand what happens on your system so I can describe it and hopefully get it fixed.
[00:20] * Retrieving #kp modes...
[00:20] <Dotz> you select the mission, try to run it, spring crashes, and then you drag the script to spring.exe, and there is the mission you were trying to run
[00:20] <zwzsg[IRC]> ok
[00:21] <zwzsg[IRC]> And the script with the mission you were trying to run, is named? (just to be 100% sure)
[00:21] <Dotz> script.txt
[00:21] <zwzsg[IRC]> cool
[00:21] <Dotz> seems like you will have to make a separate launcher
[00:22] <Dotz> so spring.exe doesn't get confused
[00:22] <zwzsg[IRC]> Thanks for your help.
[00:22] <Dotz> welcome
[00:22] <zwzsg[IRC]> what os btw?
[00:22] <Dotz> windows
[00:22] <zwzsg[IRC]> which windows?
[00:22] <zwzsg[IRC]> vista, xp, 7?
[00:22] <Dotz> xp
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: I need a Spring.Rehost command!
Ignore _script.txt, that has nothing to do with anything of that.
Re: I need a Spring.Rehost command!
Ok. Well, problem remains: Some PC don't relaunch Spring. The bug happens after the temp script is written.
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: I need a Spring.Rehost command!
It looks like that it has some problem when no argument is given, you should try adding "-s" as workaround (won't change behaviour).
edit: fixed it for ya, but when you don't give any arguments, use empty string (" " is not empty string) for the first parameter.
edit: fixed it for ya, but when you don't give any arguments, use empty string (" " is not empty string) for the first parameter.
Re: I need a Spring.Rehost command!
It doesn't work for Saktoth. The code is:
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!
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
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!
Bump!
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!
(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!