jaytea commented on a Page, Short key   -  Mar 15, 2011

Linuxuser, that piece of code is absolutely riddled with syntax errors and incorrect usage of $regex(). you seem to be under the impression that $regex() returns a substring in the subject - basic testing would have revealed this to be false.

could you please test your scripts before posting them! slight oversights or errors related to exceptional cases are of course forgivable, but for a piece of example code to not work at all is just inexcusable. you want others to appreciate your examples, do you not?

and the number of lines in which we code something is perhaps the least important consideration imaginable. we could make this using 1 single line of code, or even script it without using the letter 'e'. but that would be silly right? :P

sunslayer's example is good: 'opnick*', presumably a constant, has been factored out of each if statement. the syntax is beginner-friendly and the logic is sound and easy to follow. it serves as a good introduction to the basics of mIRC scripting by showcasing those features that come up often. i think it is far more interesting to dig into our bag of tricks when the task is more complicated/advanced.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.