| Message |
I don't think Manacle tested this bit (hey, I don't test all my posts either!) ...
if x != "notme" or "me" then Send ("cast " .. class, " " .. spellname, " on " .. target2)
end
For a start, break it into lines to look neater. Second "not equal" is ~= not !=. (The != form is from C which trips up C programmers).
Then you really want to re-test x, just saying 'or "me"' will have a different effect.
And you seem to be mixing up commas and concatenation. For neatness, use one or the other.
So in total:
if x ~= "notme" and x ~= "me" then
Send ("cast ", class, " ", spellname, " on ", target2)
end
So this spell is cast if x is neither "me" nor "notme" if that is what you intended. But if not, I prefer the else. If you are doing this *or* that, then use if/else.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|