Odd. When I did that, exactly as you said, placed an additional ) at the end, and compiled, it still doesn't work (as in still a blank screen).
Also, I do not get that error. I only get:
CreateProcess() failed with error code 2:
The system cannot find the file specified.
It seems the problem is you put wrong path to the mtrigsc.jar file. Do you use Notepad++ to compile triggers? If checking the path to mtrigsc won't help, could you post the script you execute to run MacroTriggers?
I understand. I personally don't like typing in 'TRIGGER', 'OWNERS:', 'CONDITIONS:', 'ACTIONS:', but that is why people invented the macro
If you programmed on Pascal, don't you tired of typing "BEGIN", "END", "FOR" and etc. or "class", "public", "private" in Java? It is much easier to type TRIGGER and FOR one time than copying triggers manually.
These keywords are made for sake of better visual representation. I could have made triggers syntax like that:
TRIGGER
pGameMaster
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
Opponents(pGameMaster, @Exactly, 1)
SetDeaths(pGameMaster, @Set, nGmodSingle, dcGameMode)
SetDeaths(@Foes, @Set, nMsgSingleUnderConstruction, dcDisplayMessage)
Wait(0)
SetDeaths(@Foes, @Set, nMsgMapStats, dcDisplayMessage)
TRIGGER
pGameMaster
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
Bring(pMacro1, @AtLeast, 1, @Buildings, lT1Start)
Bring(pMicro1, @AtLeast, 1, @Buildings, lT1Upgrades)
Bring(pMacro2, @AtLeast, 1, @Buildings, lT2Start)
Bring(pMicro2, @AtLeast, 1, @Buildings, lT2Upgrades)
SetDeaths(pGameMaster, @Set, nGmodMM, dcGameMode)
The program could easily tell when owners finish and conditions start (the point of occurrence of the first condition), and when conditions finish and actions start (the point of occurrence of the first action). The trigger finishes when the next trigger starts. But if one won't consistently hold special formatting rules, reading triggers like that would be difficult for others. By introducing keywords OWNERS, CONDITIONS, ACTIONS, ENDT I suggested a uniform formating style. One can like it or not, but to my mind this is better than having tens of different coding styles. For example one can format triggers above like this:
TRIGGER
// OWNERS
pGameMaster
// CONDITIONS
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
Opponents(pGameMaster, @Exactly, 1)
// ACTIONS
SetDeaths(pGameMaster, @Set, nGmodSingle, dcGameMode)
SetDeaths(@Foes, @Set, nMsgSingleUnderConstruction, dcDisplayMessage)
Wait(0)
SetDeaths(@Foes, @Set, nMsgMapStats, dcDisplayMessage)
//REGGIRT
TRIGGER
// OWNERS
pGameMaster
// CONDITIONS
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
// ACTIONS
Bring(pMacro1, @AtLeast, 1, @Buildings, lT1Start)
Bring(pMicro1, @AtLeast, 1, @Buildings, lT1Upgrades)
Bring(pMacro2, @AtLeast, 1, @Buildings, lT2Start)
Bring(pMicro2, @AtLeast, 1, @Buildings, lT2Upgrades)
SetDeaths(pGameMaster, @Set, nGmodMM, dcGameMode)
// REGGIRT
Noone will tell him, he put the ACTIONS comment in the second trigger the wrong place. And another man could format triggers like this:
TRIGGER
pGameMaster
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
Opponents(pGameMaster, @Exactly, 1)
SetDeaths(pGameMaster, @Set, nGmodSingle, dcGameMode)
SetDeaths(@Foes, @Set, nMsgSingleUnderConstruction, dcDisplayMessage)
Wait(0)
SetDeaths(@Foes, @Set, nMsgMapStats, dcDisplayMessage)
TRIGGER
pGameMaster
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
Bring(pMacro1, @AtLeast, 1, @Buildings, lT1Start)
Bring(pMicro1, @AtLeast, 1, @Buildings, lT1Upgrades)
Bring(pMacro2, @AtLeast, 1, @Buildings, lT2Start)
Bring(pMicro2, @AtLeast, 1, @Buildings, lT2Upgrades)
SetDeaths(pGameMaster, @Set, nGmodMM, dcGameMode)
No one will tell him he put wrong tabbing in the first trigger for the Opponents condition. The third man could invent his own formatting style. What will we have in the end?
I even could have made players, conditions and actions go in arbitrary order in the trigger, when conditions and actions order is defined by their relative order to the other conditions or actions independently. The first trigger could have been written then like this:
TRIGGER
SetDeaths(pGameMaster, @Set, nGmodSingle, dcGameMode)
Deaths(pGameMaster, @Exactly, nGmodUnknown, dcGameMode)
SetDeaths(@Foes, @Set, nMsgSingleUnderConstruction, dcDisplayMessage)
Wait(0)
pGameMaster
SetDeaths(@Foes, @Set, nMsgMapStats, dcDisplayMessage)
Opponents(pGameMaster, @Exactly, 1)
But it would have been a total pain reading triggers formatted like this.
Wormer, if it'd be possible, I think you should remove the case-sensitivity, however, whenever the triggers are compiled, you should put everything in the proper case, that would make it very easy to work with.
Okay, if you don't like case sensitivity so much... But changing it now could affect already written triggers. I'll leave it as it is for now, but later I could consider developing another language which won't have so much nasty capital letter keywords, will be case insensitive and won't contain '@' characters. Just to clearfy, case insensitivity would mean every identifiers or keywords distinguishing only in letters size will be the same (for example @AtLeast, @atleast, @ATLEAST, @aTleAsT would be considered the same).
Have you ever done HTML? It doesn't require the use of double quotes, just single.
HTML allows you to write strings in both ways "string" or 'string'. This is done that one could specify double (or single) quotes inside strings easily using the other quotation character to designate the start and the end of the string... But... ermmmrrr, you know... I've just looked into my code and made a discovery! LOL. You can
already use html-like strings in MacroTriggers. Period.
I thought new was good? I too am interested in what people thing of this, because I was going to attempt to make a program that did similar to what yours does, except in an .exe format, so you don't have to do as much as yours, rather just double click the program and go.
Of course not always "new is good". Okay, good luck with your program, but as a system programmer I can tell you that usually real compilers are done as executable files which are invoked solely from command line. Then Integrated Development Environments (IDE) provide text editor (and what not) and invoke those compiler.exe files themselves hiding the command line interface from the user. I believe this is done to make a layer of abstraction between the compiler and the IDE, because these are two totally distinguishing programs. I have no time and experience in developing such IDEs. I consider Notepad++ my IDE for MacroTriggers. I know writing from scratch is very interesting, but if you like to really help you better write a text editor which will have syntax highlighting similar to Notepad++, syntax hints for actions and conditions, and will hide invoking of the mtrigc compiler from the user behind a nice looking button. I can tell, this is not an easy task to make it right.
Post has been edited 2 time(s), last time on Jun 29 2009, 12:28 pm by Wormer.
Some.