AGS 2.71 Final 2 - Politically Correct Edition

Started by Pumaman, Sun 05/06/2005 23:32:14

Previous topic - Next topic

monkey0506

It also processes commands like:

// $AUTOCOMPLETEIGNORE$
// $AUTOCOMPLETESTATICONLY$

The first of which would cause autocomplete to ignore the line, i.e., if I do:

Code: ags
// header file
import int myint; // $AUTOCOMPLETEIGNORE$

// script file
int myint;
...
export myint;


Then myint would exist, but wouldn't be autocompleted.

The second is for struct member functions that should only be autocompleted if they are accessed statically, i.e.:

Code: ags
struct MyStruct {
  protected int myint;
  import void SetMyInt(int value);
  import int GetMyInt();
  import static void DoSomething(); // $AUTOCOMPLETESTATICONLY$
  };

MyStruct mystrobj;
mystrobj.(...) /* autocompletes SetMyInt and GetMyInt */
MyStruct.(...) /* autocompletes DoSomething */


So it can be useful...but it can have its drawbacks at times.  If you just separate some of the words, perhaps like:

/* str uct CommentedStruct { ... }; */


Instead of:

/* struct CommentedStruct { ... }; */


I think that should break the autocompletion...

Dorcan

#201
Mmm seems that I can't check if the backspace button is pressed with IsKeyPressed. When I look at the console, it says:
"IsKeyPressed:  unsupported keycode 8".
I'm not sure, but wasn't it supported before the 2.7 version ?

I'm making my own textbox, and I need to check if this button was pressed, as you can guess. Using the on_key_press function wouldn't be practical at all.

Any chance to support this keycode (and maybe other useful ones) for a next beta... ?

Edit: Oh, one more thing. There is no way to get rid of dynamic sprites when you close the game with ALT+F4 or by pressing the red cross. I allways get the message "Dynamic sprite # was never deleted".

Having an event eEventQuitGame would be quite useful IMO.

HeirOfNorton

Coupla string things. Not sure if these are bugs, deliberate, or just too hard to bother with... (or if I'm the only one having these problems)

First, say I have this code:
Code: ags

function MyFunction(String mystring) {
  //blah blah
}

//later

MyFunction("This is some text");


In this case, the game aborts with the error message "Cannot convert const string to String" I kinda understand why that would be, but it is rather inconvenient. It does work if I assign to a seperate String, and pass THAT String to the function.

Second, would it be possible to have Strings auto-initiallized to "", or would that just mess this up for people too much? Right now it's not very intuitive that I can declare a String, but that I cannot perform, eg. an Append function on it (because it is a null pointer, nothing to append to).

Anyway, these are work-around-able, but these seem like things that SHOULD work.

HoN

monkey0506

Interesting that it can't make the conversion from const string to String (as in the case of text surrounded by quotation marks).  I think I've done that in a couple of places where I specifically didn't want it to work with old-style strings...but I can change it.

SSH

HoN, I think AGS's behaviour is correct. A function parameter which is a "String" means that the function can modify the string. If you pass it a literal, it cannot modify the literal, so therefore if you want a function to accept literals, you must declare it as const string. If you want to use all the new methods, you can always assign the function argument to a new string as the first thing in the function.

and you can initialise strings to "" if you do:

String n="";
12

Pumaman

QuoteI'm with SSH on this one.  In general I prefer not using the interaction editor whenever possible.   Perhaps at some point in the future the script language could be extended so that interactions could be defined in the room script.  The new OO way of things presents some interesting posibilities for this and perhaps interaction functions could have useful names such as...

Yes, it would be handy to be able to bypass the inteaction editor completely for people who want to do so. That's certainly a possibility for a future version.

Quotenow that we have those nice "Music" and "Speech" subfolders, how about a "Sound" subfolder?

Yes, I'll try and get that done.

QuoteI've hit a small thing when testing a game. If I click on the room-script edit button in the room-settings editor (and then do whatever I like and finish and save or whatever happens), then the button is selected and can be 'clicked' by hitting the enter key. If I then go on to test the game, and hit enter while the whole thing is being compiled, then room-script editor pops-up. Then the game runs.

Hmm, I'll look at that, thanks for reporting it.

QuoteMmm seems that I can't check if the backspace button is pressed with IsKeyPressed

That could well be the case, I'll look into it.

QuoteIn this case, the game aborts with the error message "Cannot convert const string to String" I kinda understand why that would be, but it is rather inconvenient. It does work if I assign to a seperate String, and pass THAT String to the function.

That's a good point, which I'll look into -- as a workaround declare the function parameter as "const string" and then it will accept both Strings and literals.

edmundito

Quote from: Pumaman on Sat 15/10/2005 14:45:08
QuoteI'm with SSH on this one.  In general I prefer not using the interaction editor whenever possible.   Perhaps at some point in the future the script language could be extended so that interactions could be defined in the room script.  The new OO way of things presents some interesting posibilities for this and perhaps interaction functions could have useful names such as...

Yes, it would be handy to be able to bypass the inteaction editor completely for people who want to do so. That's certainly a possibility for a future version.

What would be cool would be if the interaction editor and the script editor were two different methods of viewing the code, kind of what the ActionScript editor does in flash, you know? You can switch between basic and advanced, but that would mean that you would be able to choose from every possible action in the interaction editor, and that would be crazy...

Also, that was  a suggestion, and this is a place to post about bugs. Oh well.

Adamski

I have a suspsicion that SetChannelVolume isn't actually working... I'm sure I've reported this one before, perhaps it's just my hardware? Anyone else mind doing a quick test?

Privateer Puddin'

#208
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22075.0 maybe it is this.. i'm not sure :D

QuoteThe music volume does get automatically reset at various points, so using SetChannelVolume on it won't work very well.

Pumaman

RC2 is now up, which fixes some bits and bobs.

QuoteI have a suspsicion that SetChannelVolume isn't actually working... I'm sure I've reported this one before, perhaps it's just my hardware? Anyone else mind doing a quick test?

What channel are you trying to use it on? As custard says, it doesn't work very well on the background music channel.

SSH

#210
Possible bug report here: I've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager before I can use test game again. It doesn't happen all the time (maybe only when quiting when a Display box is shown) but its a real pain. I'm also getting a very slow frame rate on a dual-processor AMD Athlon 64 X2 4800+ with 2G memory....

seems to happen when exiting via Windows X or Alt-X. Not with ctrl-Q yet. Also, when it finally is killed by task manager, AGS pops up "Run time engine did not terminate correctly, if prersistsent please post in Tech Forum"

Other problem I'm getting on this code:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00433BBE ; program pointer is +6, ACI version 2.71.888, gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in Credits (line 151)
from Credits (line 230)
from Room 1 script (line 12)

line 151 of Credits script is:          

       this.typet=nl.Substring(0, 1);

strangely, this was working fine until just now. It had been OK, then it broke, then I added in some debug code and it worked again. Took out the debug and it still worked, then changed something else and it broke again and I cant fix it now!

You can find this dodgy code at: http://www.lumpcity.co.uk/~ssh/credittest.rar
12

Dorcan

#211
Quote* The "dynamic sprite was not deleted" messages are no longer displayed if you close the game using the Windows Close button or Alt+F4.
* Fixed IsKeyPressed not working with backspace (ASCII code 8).
Thank you a lot :)

QuoteI've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager
Same problem for me, I think it came with the RC1 version. I'm not sure, but it seems to me that it only happened after closing the game by pressing the x button, when a warning message was supposed to appear, but for a reason or another simply didn't.

Pumaman

#212
QuoteAn exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00433BBE ; program pointer is +6, ACI version 2.71.888, gtags (0,0)

Thanks for reporting that, I've found the problem ... it's a bug in Substring and Truncate, I'll get it fixed.
(Edit by strazer: "AGS v2.71 RC 3: * Fixed crash in String.Substring and String.Truncate methods.")

QuotePossible bug report here: I've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager before I can use test game again. It doesn't happen all the time (maybe only when quiting when a Display box is shown) but its a real pain. I'm also getting a very slow frame rate on a dual-processor AMD Athlon 64 X2 4800+ with 2G memory....

Hmm, strange ... I haven't been able to replicate this yet. Do you test the game full-screen or windowed? Does it happen both ways?

SSH

#213
I've only tried Windowed, but my whole computer was acting weird yesterday (the 3d text screensaver was glitching all over and everything was very slow) and it hasn't happened yet today, since a reboot. It may be that some things were installed that "required a reboot" and the reboot was postponed causing somethign odd in the system, but I'll update if it comes up again today.

heh, 30 second later i see its doing it again...

When the AGS game is closed with the Windows X button, the window disappears from the screen, but the Taskbar thing is stil there. I can minimise and restore it still, and the zooming effect occurs back and forth, but the window is zero size, without even a titlebar.

12

Gilbert

Will it be possible that your computer is infected by a Y-rus, or that some hardware components are yelling, "I'm dying... please... help me... donate your $$$ to revify me..."?
:=

SSH

Well, the computer is only 4 weeks old, has McAfee giving it a clean bill of health, ditto with MS AntiSpyware, Spybot, AdAware.

Other factors:

I'm using the module manager to edit a module, then I leave the module manager and hit CTRL-T
12

edmundito

I personally get slow response from the default dialog options  (when you don't use a GUI) and I think the inventory gui object also give me problems but only if it's carrying inventory for 640x480. I tried this on ags 2.6x, so I don't know if 2.7+ fixed it. It all started when I installed my GeForce 6600 GT card, which is pretty powerful.

However, all of this happens if a game is running. The editor has never given me any trouble.

SSH

#217
scotch downloaded my game folder and tried it on his system and couldn't reproduce this issue either. Interestingly enough, I have dual GeForce 6600 GTs...

Let me try it on the other computer i have on my desk...

Hmm, other computer doesn't seem to have this problem. Dorcan, can you post your system specs, please, so we can see if there's a common theme?

I installed the latest video drivers and that doesn't seem to help. Also, the same problem occurs when the AGS game crashes: it displays the dialog telling me the script line and call stack and that I referenced a null pointer, then i hit OK and the  program is still in the taskbar. I can use AGS up to the point where I try and test the game, where I have to go and kill off the old prog before I can go further.
12

edmundito

What a coincidence! Mine is AGP because my computer is old... I don't know if that makes any difference.

I know that old RON games play like crap when I try to pick dialog options...

Pumaman

If you run the game normally rather than using the Test Game feature, do you also get this problem where the game hangs around after you exit?

SMF spam blocked by CleanTalk