mIRC Homepage
Posted By: weedorcollege Scripting Help - Away System - 22/04/11 01:13 AM
I downloaded and loaded a pretty simple away system for myself, which is suppose to let me add and delete reasons and away nicks for later use. However, when I am in the away system's dialog and I go to delete an away reason or away nick it gives me this in the status window:

"* /writeini: insufficient parameters (line 6, mas.ini)".

I don't know enough about scripting to figure out what's missing, so I was wondering if any of you could help me. Here is line 6 of the script:

"alias -l a_save { writeini " $+ $script $+ " settings $1 $2- }"

Can you tell me what's missing?
Posted By: Riamus2 Re: Scripting Help - Away System - 22/04/11 01:17 AM
If that's the error when you try to delete something, then that script is definitely messed up. That's trying to ADD something, not remove it. You might want to find a better script or contact the author of the script.
Posted By: weedorcollege Re: Scripting Help - Away System - 22/04/11 01:18 AM
Well, the script works perfectly fine otherwise, I'd like to be able to just fix this.

EDIT: Also, whenever I try to add something/go away/come back, it tells me the script has changed and has me reinitialize it.
Posted By: Tomao Re: Scripting Help - Away System - 22/04/11 04:18 AM
Well, you might want to replace that writeini bit to this:
Code:
writeini $qt($scriptdirmas.ini) settings $1 $2-
Posted By: weedorcollege Re: Scripting Help - Away System - 22/04/11 02:44 PM
Changing that didn't seem to fix anything.

Is there a way to make it stop asking me to reload the file from the disk?
Posted By: Masoud Re: Scripting Help - Away System - 22/04/11 04:17 PM
I think this would work:
Code:
alias -l a_save { $iif($2,.writeini,.remini) " $+ $script $+ " settings $1 $iif($2,$2-) }
Posted By: Riamus2 Re: Scripting Help - Away System - 22/04/11 04:31 PM
The original alias is fine, even if it can be improved. The problem isn't the alias. The alias is for ADDING and not for REMOVING. As I mentioned, if the script is calling that alias to remove something, then the script is messed up. If the script is doing other things incorrectly as well (such as the reload issue), then it is definitely something that should be replaced, imo. There are a lot of very good away scripts, so it's not hard to find one to do what you want and that works correctly.
Posted By: Tomao Re: Scripting Help - Away System - 22/04/11 06:18 PM
I agree with Riamus2. If the script you're having doesn't work correctly, move on to find another one. There are countless away scripts available for you to choose from.
Posted By: weedorcollege Re: Scripting Help - Away System - 22/04/11 11:42 PM
Can you guys point me to some good ones?

Originally Posted By: Masoud
I think this would work:
Code:
alias -l a_save { $iif($2,.writeini,.remini) " $+ $script $+ " settings $1 $iif($2,$2-) }


That worked for the adding and deleting issue.

There is still the issue of reloading the script when I try to change it.
Posted By: Horstl Re: Scripting Help - Away System - 23/04/11 12:14 AM
That's because you currently use the scriptfile itself to store your lines - of course the file changes if you writeini/remini to it, and mIRC, monitoring changes to the scriptfile, hence asks you time and again what to do.
If you really want to stick with an apparently flawed script, replace the location " $+ $script $+ " with another file - for example $qt($scriptdirmas.ini) as suggested above. Also make sure there's no other command in that $script modifying the scriptfile itself (that is, change all other references to $script by the same token).
Posted By: weedorcollege Re: Scripting Help - Away System - 23/04/11 12:34 PM
Do I have to create that file or can I just replace those locations?
Posted By: Horstl Re: Scripting Help - Away System - 23/04/11 05:07 PM
If the file does not exist mIRC will create it at the moment of writing to it for the first time.
© mIRC Discussion Forums