AGS v2.7 Final: Yet Another Edition

Started by Pumaman, Sat 13/11/2004 21:02:00

Previous topic - Next topic

Radiant

#540
Strange bug: You can add buttons (and the like) onto a textbox GUI. However, once you do, you won't be able to move them by dragging, or delete them, and they won't show up in the game.
(you can remove them if you unclick 'gui is textbox')

Another one... if you set a character's speech view to something excessively large (e.g. 320 pixels wide) using Sierra-style speech, then once the character starts speaking, the game crashes with an error message "unable to allocate -166 bytes of memory"

And another one... in the dialog editor, you can surround text with /* */ and it will be highlighted as comment. But it is still compiled (and causes errors). But lines starting with * are ignored.

Okay, I'll shut up now as this has nothing to do with the recent OO developments :)


RickJ

I'm having a bit of trouble accessin an object's X & Y properties.  Below is a snippet of room script that procudes a compile error when compiling the line in red.   The error is as follows:

"Error (line 49): '(null)' is not a public member of 'Object'."

I also get the error if I try using the script-o-name and also if I try assigning the property to an int variable.   I assume I'm overlooking something very obvious but I don;t know what that might be.  Perhaps someone here can see what's wrong with what I am trying to do.

function object0_a() {
   // script for object0: INTERACT WITH OBJECT
   if (player.y<120) {
      Display("You can't reach it from up here. You'll have to find a way down the curb.");
   }
   else {
      player.Walk(object[0].X, object[0].Y, eBlock);
      GiveScore (2);
      oSomething.Visible = false; 
      player.AddInventory(iKey);
      SetDialogOption (0, 3, eOptionOff);
      SetDialogOption (0, 4, eOptionOn);
   }
}


Btw, this line was formerly a MoveCharacterToObject() function and this was the simplest thing I could think of.  If there is a better way I'd be glad to have comments about that as well.


Gilbert

Hmmm I made a quick check like:

Display("X=%d Y=%d", oHihi.X, object[0].Y);

and it worked for me.
Hopefully it's not a compiler bug when using them in a function like player.Walk().

SSH

#543
This sounds like the intermittent bug that I found when doing Pixel Hunt. Basically, if you save the game (comment out error lines if need be) quit the AGS editor, reload you'll find it now compiles.

I think there must be a memory leak somewhere in the editor that is overwriting some compiler table that contains the list of valid property names of the object , or something like that

I only had this happen after I'd had the editor open in the game for several days, and it happened twice to me. But it is proably performing some specific action that causes this overwrite. To track down this bug, is there any chance that CJ could make an AGS version that logs everything done in the editor in a file, so we could then look back after fidning this occruring again for a list of suspects...?
12

RickJ

#544
Thanks Gilbot, SSH

I tried commenting out the offending lines, restarting the editor,and then uncommenting them, but the compile error still remains.   I too have seen something like this before only with character.X,Y properties.  That time I used the character.SetPosition() function instead and assumed that I had done something wrong.

Anyway here is a link to the game where this seems to be reproducible.   The offending code can be found commented out on line 49 in the Room Script of Room 102. 

Pumaman

QuoteShouldn't the Say command leave the Wait cursor graphic alone?

Currently the Say command does
mouse.UseModeGraphic(6);

I'll modify it to check if the current mode is already Wait, and if so not change the cursor.

QuoteStrange bug: You can add buttons (and the like) onto a textbox GUI. However, once you do, you won't be able to move them by dragging, or delete them, and they won't show up in the game.

Ah yes, this one came up a while back and I forgot to fix it, I'll get it done.

QuoteAnother one... if you set a character's speech view to something excessively large (e.g. 320 pixels wide) using Sierra-style speech, then once the character starts speaking, the game crashes with an error message "unable to allocate -166 bytes of memory"

And another one... in the dialog editor, you can surround text with /* */ and it will be highlighted as comment. But it is still compiled (and causes errors). But lines starting with * are ignored.

Ok, thanks for the info, those two aren't too serious since the likelihood of them occurring is quite small, so I'll leave them for now.

QuoteI'm having a bit of trouble accessin an object's X & Y properties.  Below is a snippet of room script that procudes a compile error when compiling the line in red.   The error is as follows:

Thanks for posting your game.

The reason for the problem is that you have:
#define X -24000
in your script header.

This is then turning line 49 into:
player.Walk(object[0].-24000, object[0].Y, eBlock);

and the compiler is getting confused and giving up.

I'll fix #defines so that they don't apply to words preceded by a dot operator, because I can't see any useful reason for it to work this way.

RickJ

#546
Quote
This is then turning line 49 into:
player.Walk(object[0].-24000, object[0].Y, eBlock);
That makes sense.  I knew it was something on my end but couldn't think of anything. I wasn't aware of the "#define x" since I hadn't personally coded it. Thanks for the help.

*** Edit *** Arrrrrgh! I did, I did code it after all!!!!  It was a template for setting up #define terms....   

Pumaman

Ok, the pre-final is now up.

This is basically the Final version, unless any bugs are discovered. I'll leave the pre-final up for at least 2 weeks to give people a chance to use it and report any issues that they come across.

SSH

Quote from: Pumaman on Fri 25/03/2005 13:12:03
I'll leave the pre-final up for at least 2 weeks

Awww, and I  had been hoping that you'd do an April 1st thread where you told everyone they'd have to rewrite all their scripts to use the new AGS.... and then tell them it WASNT a joke  ;)
12

strazer

Code: ags

if (1.0 < 2.0) Display("Compiles.");


Code: ags

if ((1.0 < 2.0) && (1.0 < 2.0)) Display("Does not compile.");

Quote
Error: Operator cannot be applied to this type

Code: ags

if ((1.0 == 2.0) && (1.0 == 2.0)) Display("Compiles.");


Code: ags

if ((1 < 2) && (1.0 < 2.0)) Display("Does not compile.");

QuoteError: Type mismatch: cannot convert 'int' to 'float'

Code: ags

if ((1 == 1) && (1.0 == 1.0)) Display("Compiles.");


???

RickJ

#550
I'm getting an editor crash if I edit a room script, exit/save, and then try to edit the script header.  It seems to be repeatable for me at this point.  I haven't rebooted windows and tried again yet, if that fixes it I'll be back and update this post. 

*** Edit ***
After further investigation it appears that the game files are corrupted.   Attempting to edit either Global Script or Script Header, without doing anything else casuse a crash.   I restored the main game files from a backup I made a couple of days ago and now everything seems to be working.   The game that causes the crash can be found at the link below, if that is of any interest.   

http://www.gaia-spa.com/project/demo/Archive/DQSOD-T00.00-005.zip

I am able to open the editor.dat file with metapad and see my files in there.  I suppose I can just cut and paste to recover.  Any advice or cautions would be appreciated.  Thanks..

*** Edit ***
The cut and paste thing seems to work, so everything's back.  The game is still up there if it's of any use. 

*** Edit ***
Well, after editing one of the room scripts a few times I come to find that the editor.dat file is again corrupted, or at least the editor crashes when editing the global script or header.   I can recover everything again but I don't think I'll be able to make much more progress until we figure out what's going on here.   

*** Edit ***
I have reverted back to the RC3 version and haven't had a problem since.   I also did a cleanup of my machine (scan disk, defrag, spybot, regclean, etc), other than a couple scan disk errors  from a power button reset a while back there were no anomolies found.   

I believe that RC3 version was able to read the same editor.dat file that nade the PreFinal version crash.  When I reverted to RC3 I expected that I would need to restore my Global Script and Script Header by cutting and pasting as I describe above, but to my surprise they opened without crashing.  I suppose that I may have done the recovery and forgot about it but I don't believe so.

strazer

Quote from: Pumaman on Wed 23/03/2005 19:04:31
QuoteAnother one... if you set a character's speech view to something excessively large (e.g. 320 pixels wide) using Sierra-style speech, then once the character starts speaking, the game crashes with an error message "unable to allocate -166 bytes of memory"

And another one... in the dialog editor, you can surround text with /* */ and it will be highlighted as comment. But it is still compiled (and causes errors). But lines starting with * are ignored.

Ok, thanks for the info, those two aren't too serious since the likelihood of them occurring is quite small, so I'll leave them for now.

Tracker'd:
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=515
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=516

Pumaman

Ok, I've just returned from an easter break to find that my main hard drive has died, so I'm afraid it's going to be a while before I get things back up and running to continue development of AGS. I'll look at these reported issues whenever I can do so.


Pumaman

Heh, well luckily I do have a backup of the AGS code itself, but I didn't think to take a backup of the various add-on libraries etc that it uses, so it's a long process now of finding and downloading them all again.

Let this be a lesson to everyone ... back up EVERYTHING, no matter how trivial it may seem to be. :)

Oh, and never buy a Maxtor hard drive.  :-\

Traveler

Silly question: is there any way we can help?

SSH

Quote from: Pumaman on Tue 29/03/2005 14:41:04
Ok, I've just returned from an easter break to find that my main hard drive has died, so I'm afraid it's going to be a while before I get things back up and running to continue development of AGS. I'll look at these reported issues whenever I can do so.


3 days early, CJ
12

Scummbuddy

- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Pumaman

Quote from: Traveler on Tue 29/03/2005 15:35:57
Silly question: is there any way we can help?

I don't think there is, really. Thanks for the offer though.

Quote3 days early, CJ

Haha, if only :P

strazer

Quote from: Pumaman on Sat 05/03/2005 12:30:46
Yes, the script does not have a command to say "appear on the right hand edge" or anything.

It's not a bad idea though -- perhaps NewRoomEx could accept some special values like LEFT_EDGE and RIGHT_EDGE for the X co-ordinate that would use the room edges rather than having to specify a co-ordinate.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=517

SMF spam blocked by CleanTalk