EE128 commented on a Page, Custom Command Adding and Deleting Script  -  Jul 10, 2014

Love this script, the only problem I've run into is deleting one command. I created the command "+128"
"+" is my prefix. But ever time I try to delete it I'm told it doesn't exist. Is it because the command is a number?

Lozo  -  Jul 10, 2014

Thank you for bringing this bug to my attention, I will try create and debug the problem later or tonight or over the weekend.

Glad you love the script! XD

EE128  -  Jul 10, 2014

Thanks! Out of curiosity, what causes this problem? Just in case I run into something like it in the future.

Lozo  -  Jul 10, 2014

I'm not entirely sure, I have not had a look yet, not had the chance to look in to it yet, I will let you know of my findings once I have them.

Lozo  -  Jul 10, 2014

I have found the bug and I am not quite sure what is causing it, I will try and patch a fix over the next few days and make a update, it seems to be a problem when deleting commands containing only numbers or a prefix like + and numbers.

I have a older version of the script on my RoBo bot which this script was taken and re configured from and has no problem deleting numbers, so its a bit odd.

Thanks for bringing this bug to my attention EE128.

EE128  -  Jul 11, 2014

Oh and while I'm thinking of it, (This is more of a request) would a "!cadd test Test the " be possible? Like "!test userinput" >> "Test the userinput"

Meta  -  Aug 15, 2014

EE128, yes - it is indeed because your command is a number; Specifically, in the context of $ini(%command_file,%k,$2), where $2 is +128, mIRC sees +128 as equivalent to 128, and thus tries to find the 128th item in the section rather than an item called "+128"

Try changing this line: (line 131)

if ($ini(%command_file,%k,$2) >= 1) {

To this:

if ($readini(%command_file,n,%k,$2) != $null) {
Lozo  -  Aug 15, 2014

Thank you Meta, I shall see if I can include this in the next version if it works well for the script, I have still not found a good solution for the numbers add, but I am still looking in to it, its a bit of a funny one, at the moment, I am having to remove them manually through the .ini output file. (rcdradio_commands.ini)

Sign in to comment

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.