I'm running into a problem when I'm using GMSI. (I'm using v2.1.18)
I have some code which should just insert an ability into a tower, that seems to work. But, the triggers somehow gets messed up, the code is shifted 1 row down in the list but the name stays and some triggers are just pointing to nothing which causes WE to crash.
My code: (I know some parts of it is not that nice coded but it works :P)
string mapFile = (@args == null?fileDialog("Choose a map",@inputPath,".w3x"):@args);
if(mapFile == null) fail("Choose a map file!");
Map map = loadMap(mapFile, false, false);
if(!(map.objects[s] instanceof Unit) ) continue;
if(!(map.objects[s].Hotkey == "T")) continue;
if(!(map.objects[s].rangeN1 >= 400)) continue;
map.objects[s].abilList = listInsert(map.objects[s].abilList, "A0H9");
echoln("set tower_ranges['"+getObjectId(map.objects[s])+"'] = "+map.objects[s].rangeN1+" // "+map.objects[s].Name);
string outpath = @outputPath + "/" + ("U-"+map.fileName) ;
echo("\n\nSaving map to " + outpath +"\n\n");
Edit - I got another problem but this is with the IO library.
I have this code but it causes an syntax error.
: script.SyntaxError: Syntax error in line 5 in file iotest.gsl: Writer ->w<- ; <EOF> (Identifyer)
49Insert semicolon ";" to finish previous statement