Autocomplete Error

Started by monkey0506, Wed 01/06/2005 17:36:51

Previous topic - Next topic

monkey0506

I have somehow managed to corrupt Autocomplete on my computer.  The problem is that if I type "Mode = " Autocomplete pulls up a menu of the "eModeXXX" values.

This takes place in every game that I have created with AGS 2.7, even when creating a new game.

I have even gone so far as to delete/rename ALL of my AGS game folders, delete all file type associations associated with AGS, deleting AGS, restarting the computer, redownloading AGS, and reinstalling it.

Nothing seems to fix the problem.  And even though Autocomplete would imply that "Mode" has been declared somewhere, if I type something like:

Code: ags
#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  Mode = eModeInteract;
  }
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


And then I try to compile the game, I get an error stating that Mode does not exist.  If I choose to "fix it now", Autocomplete will still try to fill in the "eModeXXX" values for a non-existant variable.

Any help would be greatly appreciated.

monkey_05_06

Edit:  Also, if I declare a variable like this

Code: ags
bool Mode = false;


Then save my game, the game compiles, I can exit and restart AGS, then try to change the value of Mode and Autocomplete still pulls up the "eModeXXX" values instead of the bool values (true/false).

Edit:  This error takes place in AGS Versions (on my computer)

2.70.598.0
2.70.599.0
2.70.601.0

In both the Default and Empty game templates.

strazer

Quote from: Pumaman on Mon 21/02/2005 19:44:50
No, it's because autocomplete doesn't work if the variable is also the name of a member variable in a struct definition (since autocomplete isn't currently clever enough to know that when it finds the definition).

Because the Character struct has a "string name" member, and that's the first definition of 'name' that it finds, any variable called 'name' will be viewed as a string by autocomplete.

So since "Mode" is the also the name of a member of the "Mouse" struct, auto-complete picks up its definition first (CursorMode).
I think this will eventually be fixed in a future version. For now, I've created a tracker entry.

monkey0506

Interestingly enough it wasn't doing this last night... I was sure I had done something.

SMF spam blocked by CleanTalk