AGS editor issues

Started by Radiant, Tue 08/05/2007 17:52:39

Previous topic - Next topic

Radiant

I've on several times experienced problems with the following:

1) It is possible to define the same global function or variable in several script modules. This may cause confusion to the programmer, as the engine will pick a function he didn't expect.

2) The editor aborts without saving over several editors that aren't particularly critical. For instance, if you attempt to open a room file that isn't there. I regularly move 90% of all rooms to a temporary folder to speed up the compilation and testing process; clicking on a nonexistent room in the not automatically updating rooms list causes the editor to bail out.

Just $.2

Pumaman

1. The problem here is that there is no distinction between global functions and "private" script functions. Since all functions in scripts are automatically global, having a check for this would also prevent two modules from both having an internal method with the same name, even though they would'nt interfere with each other.

2. This will be addressed as part of 2.8.

SSH

For 1, you could use something like Python's hacky scope hiding: Python actually invisibly renames a function (or variable, or anything) Wilma in file Fred to Fred.__Wilma
12

Snarky

I seem to recall that's exactly what C++ does as well.

Radiant

Perhaps a warning could be given if you have two 'import's with equal names (that's exactly what C++ does :) ), or if you 'import' something in a header if the corresponding function isn't actually present in the corresponding script.

Pumaman

Perhaps a warning is the best option. At the moment the compiler can't generate warnings but this is something I'd like to do in future.

Radiant

#6
Oh speaking of warnings, there are a few that inconveniently don't tell you where they occur. In particular, for anything that's logged in the logfile when the game is running, I'd really appreciate a line number. For any of those errors that abort the game because an invalid function parameter, I'd like knowing what the parameter actually was ("array index out of bounds" already does that, which is awesome and has saved me a lot of work) as well as in which line number.

Oh yeah, and I was curious why certain apparently harmless commands cause the game to abort, rather than a warning log. In particular, RemoveTint when a character isn't tinted, ReleaseView when a view isn't locked, and EndCutscene when not in a cutscene. I tried putting RemoveTint in the enter_room script for good measure but that didn't work :)

But perhaps it's not really fair for me to ask that because I'm not going to get any AGS upgrades any time soon :/

SMF spam blocked by CleanTalk