07 Sep 2017 by eqmule
- All Plugin Sources changed outside of core are attached to the post here:
viewtopic.php?f=29&t=11451&p=174399#p174399
- using namespace std; has been removed from mq2main.h
THIS MEANS your plugins will ERROR with lines like this:
error C2143: syntax error: missing ';' before '<'
The line: map<string, class CXWnd2 *> WindowMap;
To fix: Find #include "../MQ2Plugin.h" in your plugin and add using namespace std; under the LAST #include below it.
Example:OR just change the line to say std:: map<std::string, class CXWnd2 *> WindowMap;Code: Select all
#include "../MQ2Plugin.h" #include <otherheader> ... using namespace std;
-
- The reason for that change is that right now we litter ALL projects with the std namespace and it is just not good.
Let everyone that needs that namespace use it in their own projects from now on.
-
- #bind(s) are now fixed and won't screw up the macrostack anymore.
- Todays update is significant because I rebuilt the macro engine to improve performance,
it was well overdue. The biggest change is that gMacroBlock is now a map.
- Undeclared Variables are no longer tolerated, and the macroengine will not run at optimal speed
if they exist. I have added a TLO to check for them because of this and a new macro keyword #warning as well
so there is no good reason to run old macros where these kinds of variables hog cpu power:
AGAIN: IMPORTANT: Undeclared variables will slow down macro performance a LOT if they are used over and over, so, fix your macros.
-
- The Macro TLO has a new method: .Undeclared
Usage: /invoke ${Macro.Undeclared} and it will list all undeclared variables.
- New macro keyword: #warning
add it at the top of your macro, and you will get warnings if there are undeclared variables used in it.
-
- /while loops can now be nested inside /while and /for loops.
- /continue and /break should work properly inside /for loops now.
- /break works in /while loops now.
- /for loops can now have nested /for loops inside them
-
- Updated MQ2Rez and MQ2Cast to not hog the cpu looking up windows over and over.
- Other stuff to optimize and cut down on cpu intensive tasks.
Files changed outside of core:
\MQ2Cast\MQ2Cast.cpp
\MQ2Rez\MQ2Rez.cpp
01 Sep 2017 by eqmule and eqholic
- You can now call functions inside if statements in your macros
Use [] after your sub inside the if statement to tell the macro its a sub
so /if (blah[]) /call dostuff
or if it actually have parameters
/if (blah[${arg1} "hi there" 0]) /call dostuff
Example:Code: Select all
Sub Testsub /echo Enter Testsub /return Hello world /return Sub Testargs(int arg1,int arg2) /if (${arg1} > ${arg2}) { /return Testargs: ${arg1} > ${arg2} } else { /return Testargs: ${arg1} <= ${arg2} } /return Sub IsHuuge(int arg1) /echo IsHuuge ${arg1} ? /if (${arg1} > 1000) { /echo TRUE /return TRUE } else { /echo FALSE /return FALSE } /return Sub Main /echo ${Testsub[]} /echo ${Testargs[10 9]} /if (${IsHuuge[2000]} && !${IsHuuge[1]}) /echo Huuge and smaaal /return

donations for this month's patches.