Perhaps I do mean what you posted Nick. Suppose it'd be helpful if I include all of what I'm doing.
--This allows the user to set what stats they want to temper to. If they go beyond maximums and minimums, it will return an error.
<alias
name="lil_forger_temperstats"
match="^\s*temper\s+(damage|precision|speed)\s+(\d+)\s*$"
enabled="y"
group="Lil_Forger_Suite"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>
--Setting a local variable for the weapon type taken from the Lil_Forger_tempertype alias
local WeaponType
WeaponType = GetVariable("weapon_type")
--This function is used to evaluate the user's input. It takes five arguments, the maximum, minimum and user given numbers for the particular stat, said stat, and the weapon type. It then evaluates the relevant numbers, and if they meet the conditions sets an appropriate variable. If they don't, it returns an error message that tells them what the minimum and maximum values for the particular stat is.
function TemperStats (MaximumStat, MinimumStat, TemperStatValue, TemperStat, TemperWeaponType)
if (TemperStatValue \> MaximumStat or TemperStatValue \< MinimumStat) then
ColourNote ("white", "red", TemperWeaponType .. "s have a minimum " .. TemperStat .. " of " .. MinimumStat .. " and a maximum " .. TemperStat .. " of " .. MaximumStat .. "!")
else
ColourNote ("white", "green", "Tempering value for " .. TemperStat .. " is " .. TemperStatValue .. ".")
SetVariable ("temper_" .. TemperStat, TemperStatValue)
end -- if
end -- function
--Start of the alias's logic.
if string.lower("%1") == "damage" then
if (WeaponType == "rapier" or WeaponType == "hammer") then
TemperStats (180, 35, %2, "damage", WeaponType)
else
ColourNote ("white", "red", "You have to set the type of weapon you want to temper first. Use the command [temper type X] where X is one of the types of weapons (rapier, klangaxe, katana, etc.)")
end -- if
elseif string.lower("%1") == "precision" then
if (WeaponType == "rapier" or WeaponType == "hammer") then
TemperStats (235, 85, %2, "precision", WeaponType)
else
ColourNote ("white", "red", "You have to set the type of weapon you want to temper first. Use the command [temper type X] where X is one of the types of weapons (rapier, klangaxe, katana, etc.)")
end -- if
elseif string.lower("%1") == "speed" then
if (WeaponType == "rapier" or WeaponType == "hammer") then
TemperStats (280, 139, %2, "speed", WeaponType)
else
ColourNote ("white", "red", "You have to set the type of weapon you want to temper first. Use the command [temper type X] without the brackets where X is one of the types of weapons (rapier, klangaxe, katana, etc.)")
end -- if
end -- if
</send>
</alias>
My understanding is that if it's inside an alias/would be inside Mushclient's command box for making a new alias, the <, >, ", and other similar characters need to be escaped. What really kills me about this is that it worked just fine about a week ago, and now suddenly doesn't want to. Also, removing the \s still gives me the same error. I'm pretty sure it's just a dumb mistake on my part somewhere, so thanks in advance for being patient and showing dumb ol' me the light. |