 |
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Sat Nov 24, 2007 4:21 pm
CMUD Alias Problem |
This is my hbhelp alias from zMUD
Code: |
#ECHO Erian's Healer Bot
#ECHO Version 3.0 Alpha 8
#ECHO --------------------
#ECHO To use this heal bot, the following commands are available:
#ECHO healon - turns on the group based heal trigger set
#ECHO healoff - turns off the group based heal trigger set
#ECHO chealon - turns on your clan based heal trigger set (remnant 2.2 - I do not suggest usage)
#ECHO chealoff - turns off your clan based heal trigger set
#ECHO healsoff - turns off both group and clan heal trigger sets
#ECHO selfmana - this alias runs a self manaing program
#ECHO hbhelp - this help file, OF COURSE :P
#ECHO there are several more aliases that are used by the programs internal functions, I will not describe them here.
#ECHO I have a lot of built in protection and features in this bot, to request a feature for future versions, or to report a bug, mud mail Erian
#ECHO --------------------
#ECHO NOTES:
#ECHO Use setclan ~<clanname~> to set your clan, or clan triggers WILL NOT WORK!
#ECHO You need to issue "orb = orbname" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone
#ECHO In order for this to properly work with rangers see hbranger
#ECHO In order for heal over time to work, please see hbhots
|
However, when importing it into CMUD it will not compile. Can anyone tell me what is wrong with it?
Using CMUD version 1.34 |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Nov 24, 2007 4:33 pm |
Quote: |
chealoff - turns off your clan based heal trigger set
|
Add double quotes to all your #ECHOs. CMud is probably getting hung up on the minus signs. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Sat Nov 24, 2007 8:27 pm |
If trying the double quotes as suggested by Matt, change the double quotes in "orb - orbname" to single quotes or precede with ~, otherwise I think you may confuse the parser
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Nov 24, 2007 9:03 pm |
What parser? In CMud, anything AT ALL in quotes means the parser never touches it. What you see inside the quotes is what gets printed to the screen, sent to the mud, written to a file, or whatever else you're doing with it.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Sat Nov 24, 2007 10:31 pm |
First of all, look at your script in the Package Editor. Do you note some lines have non-black colored text? CMUD thinks that these are the lines containing not just a plain text to output. While CMUD can handle mixed text and numbers even if you not put the "" around that line, it can't handle the line with what it consider as operator. Here is the offending line:
Code: |
#ECHO chealon - turns on your clan based heal trigger set (remnant 2.2 - I do not suggest usage) |
Note that "not" highlited as operator. You must put "" at least around "not", or around the whole line so CMUD will treat this as text. In the future always quote your text lines with "" - it will help you to avoid different troublesome situations.
Next, you may strip ~ around <> - it is not needed, but this is up to you. Having ~ will not hurt your script anyway.
And last, as mentioned by mikeC130, you must change "orb = orbname" either to 'orb = orbname' or ~"orb = orbname~" or quote the entire line and protect double quotes inside your line with another double quotes like this (preferred way):
Code: |
#ECHO "You need to issue ""orb = orbname"" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone" |
MattLofton He has double quotes inside the line, they must be protected from been considered as "end of string" symbols. mikeC130 is right on this. |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Nov 25, 2007 6:14 am |
Bah! I knew there was a reason I disliked turning 30. 
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Nov 25, 2007 8:27 pm |
Arde wrote: |
or quote the entire line and protect double quotes inside your line with another double quotes like this (preferred way):
Code: |
#ECHO "You need to issue ""orb = orbname"" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone" |
|
I'm very surprised that this works. You'd think that it'd work like this:
"You need to issue ""orb = orbname"" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone"
where the different colours represent different strings. But work it does, so eh. |
|
|
 |
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Sun Nov 25, 2007 8:34 pm |
Thanks everyone.
I actually saw something in the help files I missed that fixed this
I edited it so all the echos are done as per the example in the CMUD help files:
#ECHO {blah blah blah}
This should be added to the changes from zMUD IMHO, because with zMUD ANYTHING after #ECHO was automatically ignored except the functions (such as %eval() and such). At least it seemed that way. Was this one of the "should never have been that way" things from the zMUD parser that Zugg set out to correct maybe? Those "undocumented functionality" from the parser being too forgiving?
Anyways. As I said, thank you all.
Once Zugg makes a Finished Scripts section for CMUD I'll repost the CMUD version, which is still backwards compatible to zMUD YAY! Though you have to convert the xml to plain text for zMUD import, I keep my 7.21 zMUD around for doing all changes to each trigger in that as well then export from there. If anyone is interested, the 2.2 version IS posted in the Finished Scripts section for zMUD. :) |
|
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Nov 25, 2007 8:42 pm |
Yes, this is one of those times when the zMUD parser was too forgiving. To compile your code properly, the parser needs to be able to tell in advance when you mean - to be a subtraction operation and when you mean it to be a string, for example. The easiest way to do that is to make you tell it which you mean rather than have it guess.
There's no finished scripts section deliberately because CMUD includes a package library. However, the forum has a few strengths over the package editor (not least of which is that the forums will email you when a thread is updated), so commence begging ;P |
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Sun Nov 25, 2007 10:34 pm |
Fang Xianfu wrote: |
Arde wrote: |
or quote the entire line and protect double quotes inside your line with another double quotes like this (preferred way):
Code: |
#ECHO "You need to issue ""orb = orbname"" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone" |
|
I'm very surprised that this works. You'd think that it'd work like this:
"You need to issue ""orb = orbname"" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone"
where the different colours represent different strings. But work it does, so eh. |
Well, after reading your post I went search help and found this: %stripq. What is the "older versions of CMUD"? What I really can't understand after that is why this line:
Code: |
#ECHO "You need to issue "orb = orbname" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone" |
does not strip any quotes at all?
Btw, examples in help article for %stripq not works |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 26, 2007 4:10 pm |
In the latest beta version, you can embed a " quote within a quoted string by using two "" quotes. Just like in other programming languages. I do not think this worked properly in the 1.34 version. You shouldn't need to use %stripq. But in v2.13, the following works:
Code: |
#ECHO "You need to issue ""orb = orbname"" with orbname being whatever you have as floating object in order for the trigger to properly remove and wear manastone" |
|
|
|
 |
|
|