mIRC Home    About    Download    Register    News    Help

Print Thread
Getting Error: * /aline: invalid window #150847 10/06/06 05:27 AM
Joined: May 2006
Posts: 98
L
Lloyd_B Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: May 2006
Posts: 98
I'm getting an error for some reason when using /aline.
It's saying: * /aline: invalid window

However, that custom window has already been created. Additionally, /aline was working until I made some changes to a script that uses that window, but the window name wasn't changed and the /aline command is still using the right window name.

I've already checked all instances where that window is referenced. Also, just to see if it would help, I closed down mIRC and restarted it, and it kept doing the same thing.

Could someone help me with this? I'm wondering why /aline would give me this problem when the custom window name is correct and has been checked.


Lloyd
Re: Getting Error: * /aline: invalid window #150848 10/06/06 05:43 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Heres some thing that might help ya copy the line that errors in the script, so theres two of them.
Then on the first one add at the front //echo -s this well echo what your about to /aline to the status window, then wehn the script fails u can look at what the line was that caused it sicne its displayed in the status window. You might find its just a simple typo, or a var not loaded correctly or some such crap.

Re: Getting Error: * /aline: invalid window #150849 10/06/06 05:52 AM
Joined: May 2006
Posts: 98
L
Lloyd_B Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: May 2006
Posts: 98
Thanks for the suggestion. I didn't need to do that, but I think there's something going on with how /aline is handling the text to be put into the window.

I fixed the problem but I'd like to know why it was causing the problem. Here's what I changed.

The line did say this:
/aline 3 @user_data [ $+ $asctime(yymmdd.HHnnss) $+ ] JOIN $address($nick,5)

Changed to:
/aline 3 @user_data $asctime(yymmdd.HHnnss) JOIN $address($nick,5)

It worked after it was changed. I simply was trying to add brackets to the time output for logging. I can do without the brackets, but I thought that was odd that it made the difference. Any ideas on why that happened?


Lloyd
Re: Getting Error: * /aline: invalid window #150850 10/06/06 08:06 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Well if u had done what i suggested you would have observed the problem clearly, example below...

//echo -s /aline 3 @user_data [ $+ $asctime(yymmdd.HHnnss) $+ ] JOIN $address($nick,5)
/aline 3 @user_data [ $+ $asctime(yymmdd.HHnnss) $+ ] JOIN $address($nick,5)

Now this would have resulted in this in status window....

/aline 3 @user_data$asctime(yymmdd.HHnnss)JOIN DaveCl!DaveC@DaveC.com
* /aline: invalid window

see how it has attached the $asctime(yymmdd.HHnnss) to the windowname and the JOIN, but not evalauated the asctime, this is due to special purposes [ & ] have in mirc.

U see the problem u actually have is the [ and ] have special meanins in mirc, they control the order of evaluation, and this caused the odd behavour to occur

To fix replace the line with this one

//echo /aline 3 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5)

The $([,) it tells mirc, "ok heres a [, but dont treat it as anything besides just the text "[" same for "]"
You would have had the same problem using say | (which is the command seperator) but that might have been more obvious since more scripters know it.

Hope this helped.

Re: Getting Error: * /aline: invalid window #150851 10/06/06 08:22 PM
Joined: May 2006
Posts: 98
L
Lloyd_B Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: May 2006
Posts: 98
Oops, yeah, my apologies. I should have tried your solution first.

Well, I'm still learning stuff. I've been using mIRC for several years but never did any real scripting with it. I just usually do minor stuff to detect NickServ and identify appropriately, make custom menus and stuff. Basics essentially.

Thanks for your patience. I'll be trying out what you showed me.


Lloyd
Re: Getting Error: * /aline: invalid window #150852 10/06/06 08:38 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
ooops in the line i said to replace
//echo /aline 3 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5)

U werent ment to have the //echo on it of course, that was becuase i was just echoing the line to make sure it came out right as a command and i pasted that //echo in as well by mistake. Im sure u would have picked that up tho. smile

corectline...
/aline 3 @user_data $([,) $+ $asctime(yymmdd.HHnnss) $+ $(],) JOIN $address($nick,5)

Re: Getting Error: * /aline: invalid window #150853 11/06/06 06:56 PM
Joined: May 2006
Posts: 98
L
Lloyd_B Offline OP
Babel fish
OP Offline
Babel fish
L
Joined: May 2006
Posts: 98
Hehe, yeah, I did. It's all working great now, with brackets.

Thanks for your time and patience in helping me with that, I appreciate it. I'll also echo things when I'm having trouble with something from now on so I can see what it's trying to do.

I actually use /echo a lot for displaying info but I don't use it enough when troubleshooting. I'll remember to use it more often now.

Additionally, I've started to read more of the help docs to get more specific info about the different identifiers. Something I haven't done in alittle while. I also found mention about the use of the [ ] brackets. I'll be doing some reading before I do more indepth scripting. I like to learn new stuff constantly anyway. smile