Complete newbie to mudlet
Posted: Fri Jul 22, 2011 6:00 pm
Couple of questions, with no particular coherence other than that they both bother me.
1. How do I make my settings stick permanently? Every time I close and reopen the program spellcheck is turned back on, and my default trigger pattern is back to "substring".
2. Supposedly in Lua, variables are automatically detected to be numbers or strings(or something else). In practice, I have initialized a variable as a number, set it equal to a matches[] variable with the (\d+) pattern, and then attempted to use it in a simple "if" evaluation(if health < maxhealth * 8 / 9), but it is treated as a string(i.e. "5128" instead of just 5128), causing the evaluation to always return false. The only way to get it to work was to multiply the variable by 1(if health * 1 < maxhealth * 8 / 9). Anybody have a clue what I might be doing wrong?
Ignore this question, I figured it out by myself. I've been using the tonumber() function on all matches[] patterns that require it.
1. How do I make my settings stick permanently? Every time I close and reopen the program spellcheck is turned back on, and my default trigger pattern is back to "substring".
2. Supposedly in Lua, variables are automatically detected to be numbers or strings(or something else). In practice, I have initialized a variable as a number, set it equal to a matches[] variable with the (\d+) pattern, and then attempted to use it in a simple "if" evaluation(if health < maxhealth * 8 / 9), but it is treated as a string(i.e. "5128" instead of just 5128), causing the evaluation to always return false. The only way to get it to work was to multiply the variable by 1(if health * 1 < maxhealth * 8 / 9). Anybody have a clue what I might be doing wrong?
Ignore this question, I figured it out by myself. I've been using the tonumber() function on all matches[] patterns that require it.