mIRC Home    About    Download    Register    News    Help

Print Thread
Scripting Help - Away System #231528 22/04/11 01:13 AM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
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?

Re: Scripting Help - Away System [Re: weedorcollege] #231529 22/04/11 01:17 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Scripting Help - Away System [Re: weedorcollege] #231530 22/04/11 01:18 AM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
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.

Last edited by weedorcollege; 22/04/11 01:20 AM.
Re: Scripting Help - Away System [Re: weedorcollege] #231531 22/04/11 04:18 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Well, you might want to replace that writeini bit to this:
Code:
writeini $qt($scriptdirmas.ini) settings $1 $2-

Re: Scripting Help - Away System [Re: weedorcollege] #231539 22/04/11 02:44 PM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
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?

Re: Scripting Help - Away System [Re: weedorcollege] #231541 22/04/11 04:17 PM
Joined: Mar 2010
Posts: 144
Masoud Offline
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 144
I think this would work:
Code:
alias -l a_save { $iif($2,.writeini,.remini) " $+ $script $+ " settings $1 $iif($2,$2-) }


Nothing...
Re: Scripting Help - Away System [Re: Masoud] #231543 22/04/11 04:31 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Scripting Help - Away System [Re: weedorcollege] #231547 22/04/11 06:18 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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.

Re: Scripting Help - Away System [Re: weedorcollege] #231549 22/04/11 11:42 PM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
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.

Last edited by weedorcollege; 22/04/11 11:44 PM.
Re: Scripting Help - Away System [Re: weedorcollege] #231550 23/04/11 12:14 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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).

Re: Scripting Help - Away System [Re: weedorcollege] #231557 23/04/11 12:34 PM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
Do I have to create that file or can I just replace those locations?

Re: Scripting Help - Away System [Re: weedorcollege] #231560 23/04/11 05:07 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
If the file does not exist mIRC will create it at the moment of writing to it for the first time.