Page 55 of 61

Posted: 20 Dec 2007, 16:56
by Argh
This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.

Posted: 20 Dec 2007, 17:58
by submarine
ah ok, i dont know much about cob scripting; s44 was just the only mod (i tested aai with pure (@argh: btw, really nice effects *g*) , ba and xta) who showed that behaviour

Posted: 20 Dec 2007, 19:34
by BlackLiger
Including the Churchile AVRE?

That's gotta be my favorate tank of them all, simply because it IS a demolition tank.

Posted: 20 Dec 2007, 20:01
by FLOZi
Argh wrote:This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
Which idiot did this?

Posted: 20 Dec 2007, 20:07
by Argh
I think that was KDR_11r... be nice, I think Peet requested it for Simbaes, and it's potentially useful. Just add another parameter to your mobile builder scripts, like so:

Code: Select all

StartBuilding(heading,pitch)
... that's all you need to do. You don't actually have to do anything with the parameter, just supply it. I agree with you, it shouldn't have been written this way (it'll probably break all of the OTA mods until their maintainers get un-lazy and learn how to use Scriptor for a second, omg), but that's what's going on. "Lucky" for me, I was the first game being tested heavily in SVN, so I saw this first. Should be easy enough to fix in Spring- just supply 0 if the parameter is undefined, so that the stacksize is correct, I would think...

Posted: 20 Dec 2007, 20:13
by FLOZi
Yeah, but it seems Nemo has done something with our infantry includes which means none of the infantry builders will recompile.

So we're screwed unless I figure out wth they won't compile.


I'm also pissed off with Spiked for not noticing this as he was doing SVN testing. Rargh. :(

Posted: 20 Dec 2007, 20:14
by Argh
Eh? What? Decrypt the COBs, then, and yank the #includes out...

Posted: 20 Dec 2007, 20:20
by Peet
Well it was KDR who added the pitch, and Tobi who modified the stack to make errors when a function has the wrong number of parameters...yes, it should definitely not complain about having too few parameters in a function.

Posted: 20 Dec 2007, 20:22
by Argh
It's not that it shouldn't be a problem, Peet. It's that it should default to a value of 0 for that parameter, instead of spewing errors to chat and infolog, and ultimately being a cause of desync, which is the big issue, 'specially for backwards compatibility / lazy modders :roll:

Posted: 20 Dec 2007, 20:26
by Peet
Peet wrote:yes, it should definitely not complain about having too few parameters in a function.

Posted: 20 Dec 2007, 20:27
by Argh
Sorry, I read that as, "don't bother showing errors". My bad.

Posted: 20 Dec 2007, 20:32
by FLOZi
Anyway.

I'm calm. 8)

yuritch (PRAISE BE UPON HIM, MORTALS) found the revision where nemo had replaced all the infantry includes with new ones which were 'not ready yet. don't recompile infantry scripts'. Why he didn't branch them I don't know. So, fixed.

Pain in the arse though. Especially as I'd just submitted to LordMatt :lol: :cry:

Posted: 21 Dec 2007, 06:45
by Neddie
Oh, for the love of.

Posted: 21 Dec 2007, 13:19
by FLOZi
According to submarine the latest SVN no longer bitches about it anyway. :lol: :x

Posted: 21 Dec 2007, 13:34
by Tobi
FLOZi wrote:
Argh wrote:This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
Which idiot did this?
I did it, and I will not revert it, unless you want moar sync errors (it was accessing the stack vector outside it's bounds.)

If it can be argued default arguments that are always set to 0 if not given is a feature of COB (is there a COB spec anywhere?..guess not), then feel free to modify it again. I just don't like Spring's default behaviour of just desyncing/crashing instead of giving a decent error message.
Argh wrote: It's not that it shouldn't be a problem, Peet. It's that it should default to a value of 0 for that parameter, instead of spewing errors to chat and infolog, and ultimately being a cause of desync, which is the big issue, 'specially for backwards compatibility / lazy modders Rolling Eyes
Actually it DID possibly cause desync/segfault. I FIXED IT.
According to submarine the latest SVN no longer bitches about it anyway. Laughing Mad
The checking code is still there, no one changed it.
http://spring.clan-sy.com/fisheye/brows ... /Units/COB

So I guess you fixed all scripts or submarine failed at testing :P

Posted: 21 Dec 2007, 15:34
by Argh
Actually it DID possibly cause desync/segfault. I FIXED IT.
Ah. Well, I assumed that it was causing problems once it was expected by the patch accessing the variable's state, not that it was causing problems and we just hadn't seen it until you were investigating desync. Just my misunderstanding, frankly.

Posted: 21 Dec 2007, 19:34
by Noruas
This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
Aww Hell.
You just gave me more stuff to do. :(

Posted: 21 Dec 2007, 19:40
by FLOZi
Something is borked with unit sounds in SVN. Weapons are unaffected. Any ideas where I should be looking?

Posted: 21 Dec 2007, 22:11
by yuritch
Looks like S'44 svn is down (along with the rest of bountysource). I wanted to commit some model changes (mainly Long Tom), now I cannot do this.

Posted: 22 Dec 2007, 02:41
by FLOZi
Bountysource is being a total pain atm. It's back up, I just comitted the fix for the sounds (Peet spotted an error message I totally missed. I need to sleep more and drink less.)