• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE #No auto search/suggestion popup

Not sure if I'm doing something wrong or if it's a bug in the editor, but local or limited scope declared variables (var Somevariable=a value or Somevariable=a value) don't seem to recognised by the editor in scripts where they are declared. It does work in objects. Global declared variables however are recognised everywere. E.g.:

At the start of the script:
var tmpVersion="EM001";//Only set here

further down in the same script:
buffer_write(tmpHeaderData,buffer_string,tmpVersion);

Normally in objects when you start to type the variable, it will popup with suggestions that fit the part you typed so far. However in scripts this doesn't happen with local or limited scope declared variables, only with global declared variables.

Additional information:

It's only a specific script that doesn't seem to work as it does work in other scripts. Even more confusing, #region and #endregion don't work either only in this script, but do woirk in other scripts.

Here's the code for that specific script:

//Script to create the Game data files
//#region Declarations
var tmpGameData=buffer_create(100,buffer_fixed,1);
var tmpHeaderData=buffer_create(7,buffer_fixed,1);
// var tmpVersion="EM001";//Only set here
// var tmpNrOfGirls=1;//Only set here
// var tmpGirlID=0;
// var tmpGirlName="";
// var tmpGirlNrOfMazes=0;
// var tmpNrOfMazes=0;
// var tmpMazeID=0;
// var tmpNrOfRooms=0;
// var tmpRoomID=0;
// var tmpRoomType=0;//Room types: 0=Normal, 1=key, 2=tv, 3=key+tv
// var tmpExitNorthTo=0;
// var tmpExitNorthStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitNorthEastTo=0;
// var tmpExitNorthEastStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitEastTo=0;
// var tmpExitEastStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitSouthEastTo=0;
// var tmpExitSouthEastStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitSouthTo=0;
// var tmpExitSouthStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitSouthWestTo=0;
// var tmpExitSouthWestStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitWestTo=0;
// var tmpExitWestStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitNorthWestTo=0;
// var tmpExitNorthWestStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitUpTo=0;
// var tmpExitUpStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitDownTo=0;
// var tmpExitDownStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitInTo=0;
// var tmpExitInStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpExitOutTo=0;
// var tmpExitOutStatus=0;//Status of exit: 0=No exit, 1=Normal, >1=locked with color
//Colors: 2=Blue, 3=Brown, 4=Green, 5=Grey, 6=Light blue, 7=Orange, 8=Pink, 9=Purple, 10=Red, 11=Yellow
// var tmpGirlPresentID=0;//Girl ID in this room present (0=No girl)
// var tmpTVStatus=0;//Status of TV in room: 0=No TV, 1=TV off, 2=TV on
//#endregion
#region Header
buffer_write(tmpHeaderData,buffer_string,"EM001");//Version
buffer_write(tmpHeaderData,buffer_u8,1);//Nr of girls
#endregion
#region Main maze
buffer_write(tmpGameData,buffer_u16,6);//Nr of rooms
#region room 1
buffer_write(tmpGameData,buffer_u16,1);//Room ID
buffer_write(tmpGameData,buffer_u8,0);//Room type
buffer_write(tmpGameData,buffer_u16,3);//Exit North
buffer_write(tmpGameData,buffer_u8,1);//Exit North status
buffer_write(tmpGameData,buffer_u16,0);//Exit Northeast
buffer_write(tmpGameData,buffer_u8,0);//Exit Northeast status
buffer_write(tmpGameData,buffer_u16,0);//Exit East
buffer_write(tmpGameData,buffer_u8,0);//Exit East status
buffer_write(tmpGameData,buffer_u16,0);//Exit Southeast
buffer_write(tmpGameData,buffer_u8,0);//Exit Southeast status
buffer_write(tmpGameData,buffer_u16,0);//Exit South
buffer_write(tmpGameData,buffer_u8,0);//Exit South status
buffer_write(tmpGameData,buffer_u16,0);//Exit Southwest
buffer_write(tmpGameData,buffer_u8,0);//Exit Southwest status
buffer_write(tmpGameData,buffer_u16,2);//Exit West
buffer_write(tmpGameData,buffer_u8,1);//Exit West status
buffer_write(tmpGameData,buffer_u16,0);//Exit Northwest
buffer_write(tmpGameData,buffer_u8,0);//Exit Northwest status
buffer_write(tmpGameData,buffer_u16,3);//Exit Up
buffer_write(tmpGameData,buffer_u8,1);//Exit Up status
buffer_write(tmpGameData,buffer_u16,0);//Exit Down
buffer_write(tmpGameData,buffer_u8,0);//Exit Down status
buffer_write(tmpGameData,buffer_u16,3);//Exit In
buffer_write(tmpGameData,buffer_u8,1);//Exit In status
buffer_write(tmpGameData,buffer_u16,0);//Exit Out
buffer_write(tmpGameData,buffer_u8,0);//Exit Out status
buffer_write(tmpGameData,buffer_u8,0);//Girl ID present (0=No girl,>0=Girl ID)
#endregion
#endregion
#region Girls
#region Addy
buffer_write(tmpGameData,buffer_u8,1);//Girl ID
buffer_write(tmpGameData,buffer_string,"Addy"); //Name
buffer_write(tmpGameData,buffer_u16,1);//Number of mazes
#region Maze 1
buffer_write(tmpGameData,buffer_u8,1);//Maze number
buffer_write(tmpGameData,buffer_u8,16);//Number of Rooms
#region Room 1
buffer_write(tmpGameData,buffer_u16,1);//Room number
buffer_write(tmpGameData,buffer_u8,0);//Room type
#endregion
#endregion
#endregion
#endregion

More aditional info: Now it's becoming even more confusing. After exiting and restarting GMS2 it works again. Anybody any thoughts? because this is really weird.
 
Last edited:
Top