I can program in C++ just fine with if and while statments, but for some reason I can't get my code to work using MIRC.

Quote:
on *:TEXT:*!check*:#Wolfscripts:
{
if (NXwolf isin $nick) && (!check isin $1)
{
while ($1 == wolf)
{
if (NXwolf isin $2)
{ { /msg #Wolfscripts test complete } }
}
}
}


The above code isn't even close to what I have planned, but if I can't get the above to work, then I won't get anywhere. The basics of this program is to be constantly reading a channel for for the command !check. Once that command is used, the program will then cycle though the next couple of lines so long as wolf is in $1. It then goes down to check what is in $2. Provided both rn correctly, it will msg a test complete.

While in IRC, I've done the following for the command.

(I typed) !check
(bot types) wolf NXwolf

Check should have initiated the program and then the bot's line should have continued to complete the test, however, I get no error returns or anything. As if the code doesn't work/respond at all. I realize it's been a while since I last touched C++, but I just don't see what I'm doing wrong.


Ok, now my extra question is. I want to make this script run on a timer delay. The script should be able to finish on it's on with no timer, but in the event of a failure or something, I'd like a timer that will auto abort the program.

Thanks a lot for any help,
NX