Page 1 of 1

Problem saving in b12

Posted: Fri Oct 08, 2010 5:38 am
by Lap
Lua Error: attempt to yield across metamethod/C-call boundary
At [C]:-1
At [C]:-1 yield
At /engine/Savefile.lua:106 saveObject
At /engine/Savefile.lua:198 saveGame
At /mod/dialogs/Quit.lua:33 ?
At /engine/

Is now what I get on save exiting a game.

I updated from a b9 module to a b12.

I've changed the following in the game.lua file.

Code: Select all

function _M:saveGame()
	savefile_pipe:push(self.save_name, "game", self)
	self.log("Saving game...")
end

function _M:tick()
	if self.level then
		self:targetOnTick()

		engine.GameTurnBased.tick(self)
	end
	if self.paused and not savefile_pipe.saving then return true end
end

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 7:15 am
by darkgod
Hum I'll need to test some more, are your changes in svn already ? I'll check them out.

The error message means you are trying to yield a coroutine that is called by a C method, well not you I suppose :)

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 7:48 am
by darkgod
I dont find this change in the current svn but if I apply it it seems to work, can you commit your changes please?

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 7:49 am
by darkgod
Oh and BTW if you want you can give me write access to the svn :)

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 7:41 pm
by Lap
Well I try not to commit broken code to the SVN since it tends to result in me getting a lot of confused users, but in this case I'll do it anyways.

I added darkgod on sourceforge to the SVN. I hope that's your sourceforge username, otherwise I just added some random guy.

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 8:15 pm
by darkgod
Ah I see, saving via ctrl+s works but not by exiting. That's because you did not update dialogs.Quit

As for the account I did not use it for an eternity I dont even remember the email I used :/
I have made a new account: darkgod7

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 8:52 pm
by Lap
Ahh, gotcha. I just went by the blog post and only remember seeing updating dialogs.death.

Thanks for taking a look at it.

Re: Problem saving in b12

Posted: Fri Oct 08, 2010 9:03 pm
by darkgod
My pleasure :)