When I encouner unusual things like this, I break the code down into smaller chunks and add diag messages. Simple things, like printing out section numbers so I know where a process is, to displaying values of variables - even when I think I know what they are - er - should be! While unlikely, it's possible that the environment was not set when Kix ran during logon but is later when run from the command prompt. Display the content of the %appdata% variable, and the @IPADDRESS as well - are they valid? Do they contain what you expect?
The $C=0+0 was discussed in the thread you referenced, but incrementing by 0.5 is not correct. As I thought, the values move up when one is deleted, so referencing zero all the time is correct.
Unless you've cut and pasted many separate sections of code into your example, you're EndIf is either missing or out of place. You should have an EndIf before any of the functions start, and not later on in the code. Also, while valid, placing functions inline with your code makes the application more difficult to troubleshoot - especially when they are within other code pairs like loops or If/Endifs. Put all your functions first or last. I create my core code, then include functions dedicated to the script, and then those that are from the shared-code library. Not right or wrong, just helps maintain hairs in your head.
Glenn
_________________________
Actually I
am a Rocket Scientist!