View Full Version: FIXED: Extra "0" corrupts gamedata

lassie >>Bug Reports >>FIXED: Extra "0" corrupts gamedata


<< Prev | Next >>

bigmac- 07-02-2006
FIXED: Extra "0" corrupts gamedata
From Darth Vader: Sometimes I get an error when republishing the generated ActionScript from LassieAS (./_system/_data.as) This is what comes out of Lassie in such cases (not always!): . . . _root.staticdata = { dialogue: { 0 d0:{char:"_char", exp:0, text:"Nothing.", voice:""}, d1:{char:"_char", exp:0, text:"No.", voice:""}, d2:{char:"_char", exp:0, text:"What use would that be of?", voice:""}, . . . Should be (no "0" after dialogue open brace): . . . _root.staticdata = { dialogue: { d0:{char:"_char", exp:0, text:"Nothing.", voice:""}, d1:{char:"_char", exp:0, text:"No.", voice:""}, d2:{char:"_char", exp:0, text:"What use would that be of?", voice:""}, . . .

bigmac- 01-09-2007

It appears that there is a second bug at work here related to this random zero. From Paranoia: The wrong lines of dialogue are playing for some game interactions.

bigmac- 01-09-2007

Sweet, I think we may have made some progress on this bug! Paranoia submitted a "_data.as" file with some suspect code in it. I think that these two issues are clearly related and I'm getting a general idea of what the problem is. It appears that the dialogue line counter is somehow being reset at some point during compile... note the numbered data elements in the sample code below: dialogue: { 0 d:{char:"_char", exp:0, text:"----", voice:""}, d1:{char:"_char", exp:0, text:"----", voice:""}, d2:{char:"_char", exp:0, text:"----", voice:""}, d3:{char:"_char", exp:0, text:"----", voice:""}, d4:{char:"_char", exp:0, text:"----", voice:""}, d5:{char:"_char", exp:0, text:"----", voice:""}, d0:{char:"_char", exp:0, text:"Look default dialogue", voice:""}, d1:{char:"_char", exp:0, text:"Talk default dialogue", voice:""}, d2:{char:"_char", exp:0, text:"Use default dialogue", voice:""}, d3:{char:"_char", exp:0, text:"Item default dialogue", voice:""} } I see two issues (incidentally, these are notes to myself for later. the community can ignore this babble)... :arrow: Issue #1: That first node ("d:") does not have a coupled integer, which should be a... wait for it... YES! a zero! It looks as if the node's integer is for some reason being written onto the previous line. Hence the random (corrupting) zero. Weird. :arrow: Issue #2: The node increment resets after "d5", creating a second instance of those first nodes. This accounts for the misplaced dialogue bug, as a dialogue reference may intend to reference the second instance of a node and yet Flash just finds and returns the first. Thanks for passing this data file along Nige, you've clearly identified the problem. Now it's just a matter of digging into the code to resolve it. We'll see how easy that proves... :?

bigmac- 01-09-2007

Final update for the night: The misplaced dialogue issue has been resolved. It was simply a matter of sequences being processed before the dialogue line counter was initialized at zero (effectively resetting the counter). I still don't know that this accounts for the random zero though. I don't think this update will change that, and I don't have a project file that was writing bad data to -*test*-('") against. If someone has a project that is currently dumping a zero at publish, please send it to me. Thanks!

bigmac- 01-10-2007

SUCCESS!!! The case of the random zero is CLOSED. We all probably noticed that the zero was a little random, right? Yep, it would get written into gamedata if you exported for AS multiple times without quitting the application between outputs. So, your first output would be clean, then each subsequent output would have a zero in it until you restarted the Lassie Editor. Why? Silly, silly, silly... the compiled dialogue data was being flushed at the end of each output by being set to zero. Then if dialogue was recompiled, the new output was being written onto the end of that zero. I've changed the flush value to a blank string and the issue is OFFICIALLY resolved. Look for an updated release soon.

idzol- 05-19-2007
Other erroneous data output
Greg, I noticed some additional output errors to _data.as off a first compile of the demo downloaded from the website recently (15/05/07). Project: LassieAS_demo_v065a Engine: LassieAS_win_v08b diadefaults: < < <""def_look"">, <""def_talk"">, <""def_use"">, <""def_item"">, <"def_look", "def_talk", "def_use", "def_item"> > >, First four rows generating syntax errors. Same values replicated further down: _root.staticdata = { dialogue: { "def_look":{char:"_char", exp:0, text:"I don't see anything special about that", voice:"def_look"}, "def_talk":{char:"_char", exp:0, text:"I have nothing to say to that", voice:"def_talk"}, "def_use":{char:"_char", exp:0, text:"What would I do with it?", voice:"def_use"}, "def_item":{char:"_char", exp:0, text:"This item has no use here", voice:"def_item"}, d0:{char:"_char", exp:0, text:"It's a plain cardboard box", voice:""}, d1:{char:"_char", exp:0, text:"Okay, that sliced through the tape", voice:""}, d2:{char:"_char", exp:0, text:"Hmmm. There was nothing in it but a bunch of packing peanuts", voice:""}, d3:{char:"_char", exp:0, text:"It's locked", voice:""}, d4:{char:"_char", exp:0, text:"It's locked", voice:""}, The export appears to be generating superfluous "def_look", "def_talk" dia tags. The original project had to be upgraded at the start so I realise this may be resultant of an incompatibility with the old projects. I thought I'd bring it to your attention for any users trying to compile the provided demo. Thanks, idzol

NigeC- 05-19-2007

you can fix the error by removing the default speech the text field in the bottom corner change it to #none originally it says def_talk etc i can't remember the exact reason but that will let you compile theres tutorial here that maybe helpful http://pgames.bikelectrix.co.uk/wiki oh and welcome!

idzol- 05-19-2007
Fast Response
Thanks NigeC,

bigmac- 05-20-2007

That's weird... it was compiling with double quotes on default dialogue items. I've never seen that before.

NigeC- 05-20-2007

try compiling the demo Greg..

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.