Sounds cool, PM me the code and I'll implement it.
function doEquation(%equ){ %equ = strReplace(%equ, " ", ""); %equ = strReplace(%equ, "*", "x"); %old = %equ; %equ = strReplace(%equ, "+", " + "); %equ = strReplace(%equ, "x", " x "); %equ = strReplace(%equ, "/", " / "); %equ = strReplace(%equ, "-", " - "); %equ = strReplace(%equ, "^", " ^ "); while(strPos(%equ, "(") > -1 && strPos(%equ, ")") > 0) { %start = strPos(%equ, "("); %end = %start; %level = 1; while(%level != 0 && %end != strLen(%equ)) { %end++; if(getsubStr(%equ, %end, 1) $= "(") %level++; if(getsubStr(%equ, %end, 1) $= ")") %level--; } %inbrackets = getsubStr(%equ, %start+1, %end - strLen(getsubStr(%equ, 0, %start + 1))); %leftofbrackets = getsubStr(%equ, 0, %start); %rightofbrackets = getsubStr(%equ, %end + 1, strLen(%equ) - %end); %equ = %leftofbrackets @ doEquation(%inbrackets) @ %rightofbrackets; } for(%a = 0; %a < getWordCount(%equ); %a++) { if(getWord(%equ, %a) $= "^" && %a != 0) { %f = getWord(%equ, %a - 1); %l = getWord(%equ, %a + 1); %equ = setWord(%equ, %a, mPow(%f, %l)); %equ = removeWord(removeWord(%equ, %a + 1), %a - 1); %a--; } } for(%a = 0; %a < getWordCount(%equ); %a++) { if(getWord(%equ, %a) $= "x" || getWord(%equ, %a) $= "/" && %a != 0) { %f = getWord(%equ, %a - 1); %l = getWord(%equ, %a + 1); %o = getWord(%equ, %a); switch$(%o) { case "x": %equ = removeWord(removeWord(setWord(%equ, %a, %f * %l), %a+1), %a-1); %a--; case "/": %equ = removeWord(removeWord(setWord(%equ, %a, %f / %l), %a+1), %a-1); %a--; } } } for(%a = 0; %a < getWordCount(%equ); %a++) { if(getWord(%equ, %a) $= "+" || getWord(%equ, %a) $= "-" && %a != 0) { %f = getWord(%equ, %a - 1); %l = getWord(%equ, %a + 1); %o = getWord(%equ, %a); switch$(%o) { case "+": %equ = removeWord(removeWord(setWord(%equ, %a, %f + %l), %a+1), %a-1); %a--; case "-": %equ = removeWord(removeWord(setWord(%equ, %a, %f - %l), %a+1), %a-1); %a--; } } } return %equ;}
Code: [Select]function doEquation(%equ){ %equ = strReplace(%equ, " ", ""); %equ = strReplace(%equ, "*", "x"); %old = %equ; %equ = strReplace(%equ, "+", " + "); %equ = strReplace(%equ, "x", " x "); %equ = strReplace(%equ, "/", " / "); %equ = strReplace(%equ, "-", " - "); %equ = strReplace(%equ, "^", " ^ "); while(strPos(%equ, "(") > -1 && strPos(%equ, ")") > 0) { %start = strPos(%equ, "("); %end = %start; %level = 1; while(%level != 0 && %end != strLen(%equ)) { %end++; if(getsubStr(%equ, %end, 1) $= "(") %level++; if(getsubStr(%equ, %end, 1) $= ")") %level--; } %inbrackets = getsubStr(%equ, %start+1, %end - strLen(getsubStr(%equ, 0, %start + 1))); %leftofbrackets = getsubStr(%equ, 0, %start); %rightofbrackets = getsubStr(%equ, %end + 1, strLen(%equ) - %end); %equ = %leftofbrackets @ doEquation(%inbrackets) @ %rightofbrackets; } for(%a = 0; %a < getWordCount(%equ); %a++) { if(getWord(%equ, %a) $= "^" && %a != 0) { %f = getWord(%equ, %a - 1); %l = getWord(%equ, %a + 1); %equ = setWord(%equ, %a, mPow(%f, %l)); %equ = removeWord(removeWord(%equ, %a + 1), %a - 1); %a--; } } for(%a = 0; %a < getWordCount(%equ); %a++) { if(getWord(%equ, %a) $= "x" || getWord(%equ, %a) $= "/" && %a != 0) { %f = getWord(%equ, %a - 1); %l = getWord(%equ, %a + 1); %o = getWord(%equ, %a); switch$(%o) { case "x": %equ = removeWord(removeWord(setWord(%equ, %a, %f * %l), %a+1), %a-1); %a--; case "/": %equ = removeWord(removeWord(setWord(%equ, %a, %f / %l), %a+1), %a-1); %a--; } } } for(%a = 0; %a < getWordCount(%equ); %a++) { if(getWord(%equ, %a) $= "+" || getWord(%equ, %a) $= "-" && %a != 0) { %f = getWord(%equ, %a - 1); %l = getWord(%equ, %a + 1); %o = getWord(%equ, %a); switch$(%o) { case "+": %equ = removeWord(removeWord(setWord(%equ, %a, %f + %l), %a+1), %a-1); %a--; case "-": %equ = removeWord(removeWord(setWord(%equ, %a, %f - %l), %a+1), %a-1); %a--; } } } return %equ;}Here's one that supports powers on top of what brian's offers.
A nice fella named Gravity Cat's TDM (BL_ID 23300) built some nice decoration to show our support!
thats a bunch of national socialist symbols (or whatever they are called) Sub...... :o
I know that.[/facepalm]I cleared it and banned him as soon as I saw.
I'm still puzzled, what do I use instead of messageClient? Also, can it detect variables?:
Swasticas.
So how'd you get the screenie...?The plot thickens!Its a server preview imagep.s. will post code in reguard to assisting you with this post tomorrow:Just saw that post.Will help tomorrowI figure it outAlso not doing client sided version anymore.
You say v1.5 will be released soon yet you don't tell us what is new in it
This update does not contain any new features, but I still see it as an important one.*Re-did half the code to reduce the amount of lines and wedge pattern (see bottom of post).*/calc is now /calc help. /calc will not work.*Message now says CC <type>: instead of CC (<type>):Wedge Pattern FixSo if you ever looked at the server.cs it would sometimes like a bit like this:Code: [Select]if(blah = 1){ if(blahhj = 1) { dothis; }}Now it is like this:Code: [Select]if(blah = 1 && blahhj = 1){ dothis;}
if(blah = 1){ if(blahhj = 1) { dothis; }}
if(blah = 1 && blahhj = 1){ dothis;}