Local mIRC Bot timing out after some time?

Hello all!

I am attempting to get a local mIRC bot going for fun and entertainment. The coding to get the bot responding to commands works, for the most part.

However, if after a long period of inactivity (sometimes as quickly as 10 minutes) from the bot, it will not respond to a command. But once a command is entered, this “awakens” the bot and then it will start responding again, but only after ignoring that initial message. Only to go AWOL after some time again.

One thing to note is that when a command is entered, and ignored, mIRC gives the message “* /msg: insufficient parameters (line 25, remote.ini)”. Line 25 of the code works just fine once the bot has been awoken though. So confused.

Perhaps there is a setting within mIRC that I inadvertently changed without realizing the impact it would have on the bot? Anything that might help get me on the right path is much appreciated!

Edit: Google tells me this indicates a syntax error, verify that you match all brackets or don’t end a statement too early.

Now I am not familiar with mIRC scripting, but if you post some of your code it would be easier for others to help you.

Would that be the issue, even if the bot does respond correctly once “woken up”?

The whole command is:

n10=on *:text:Test:#: {
n11= if ((%floodTest) || ($($+(%,floodTest.,$nick),2))) { return }
n12= set -u10 %floodTest On
n13= set -u30 %floodTest $+ $nick On
n14= msg $chan $read(TestLines.txt)

The bot is meant to read a random line from the file upon a given command. The file is in the AppData\Roaming/mIRC folder. I assume the error message is referring to line 14? Pretty standard to have the closing bracket be on its own line. No?

The error refers to Line 25 but the actual problem might be earlier.

You script is greek to me, but perhaps it fails because it reaches the return statement. Something in you logic could be wrong, making it only work if has recieved a command recently. floodTest is related to command spamming, right?

Yes, the floodTest is to stop the command from getting spammed and ultimately getting the bot banned.

I’ve tested the issue out without the flood control and it still happens. In fact, if I remove everything and just make this script the only thing happening, the problem persists.

The problem only happens on the read() command, because if I remove that, the problem goes away. But there’s nothing more to the read command, it’s one of the most simple out there.

It’s quite strange and irritating.

Since it’s failing on the read() it might be the OS’s Power Settings turning the harddrive off.

Muddr, thank you very much for your reply. It got me started on the path that lead to what I’m tentatively calling success.

Basically, in my text file, there was a blank line between each of the desired lines. Hitting enter twice at the end of a desired line.

I have removed the blank lines, saved, and now have had a 100% success rate.

I knew it was going to be something simple and embarrassing. I could have sworn there was supposed to be a blank line between them. Guess not!

I’ll report back if it starts failing again, but I’m confident we got this one in the bag. Thanks everyone for your help and time!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.