Nick Gammon said:
I suggested:
if not GetVariable(vName) then
vValue = 1
else
vValue = tonumber(GetVariable(vName)) + 1
end -- if
You have:
if not GetVariable(vName):
vValue = 1
else
vValue = int(GetVariable(vName)) .. 1
There are four differences to what I have.
*You didn't change ":" to "then"
*You changed "+" to ".." for some reason
*You didn't put an "end" in for the "if"
*You didn't change "int" to "tonumber"
On the line with "vName.replace" on it you ignored my suggestions completely.
-----
These remarks apply to most of your code. There are many "if" or "elseif" statements you have there still with a colon on the end of the line, and no "end" at the end of the "if".
I've updated the code as I comprehend it, but I'm not quite sure I completely understand how to apply if-then statements nor how to apply the ends completely. I've added thens on all colon ending if/elseif statments.
I'm not quite sure how to apply the end -- if.
https://github.com/several-wolves/mushclient/blob/main/counting