mIRC Home    About    Download    Register    News    Help

Print Thread
debug #158150 01/09/06 03:44 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
i seem to have a problem using the debug command on start or connect or just generally anything that would make it run automaticly from the script.

if i type in /debug -i @debug $debug it does what it is suppose to do

but if i do like

Code:
 on 1:connect:{ debug -i @debug $debug }  

it gives me

@debug
-
* /debug: invalid parameters (line 17, script.ini)


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: debug #158151 01/09/06 04:02 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Quote:

The -i switch calls the specified identifier before a debug line is logged. The return value of the identifier is used as the debug line.

The $debug identifier returns the name of debug file or @window.


the $debug identifier has no value at time of the command so returns $null

the -i switch requires you to add an identifier parameter which you didn't do in your command


If it ain't broken, don't fix it!
Re: debug #158152 01/09/06 04:14 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
right, i have done that too, made a identifer that is like $debug_p and it just being like a simple

Code:
 alias debug_p { return testworks - $1 }  


and it still gives me the same error.


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: debug #158153 01/09/06 09:24 PM
Joined: Dec 2005
Posts: 58
S
SCNDRL Offline
Babel fish
Offline
Babel fish
S
Joined: Dec 2005
Posts: 58
try this ;

Code:
alias debuq { debug -i debugg debugq }
alias debugq {
echo -a $1-
}
on *:Connect:{
debuq
}


i like that
Re: debug #158154 01/09/06 10:52 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You have 3 porblems here
(1) DEBUG is inbuilt a command so if you have created a ALIAS DEBUG, then your never even calling the internal DEBUG command, your calling the alias.
(2) You can not call ALIAS DEBUG as an $identifier, becuase unlike problem one calling a alias thats replacement of an internal command you cant replace internal $identifiers
(3) The debug line is ment to have the name of the $identifier you want to use, but not using the $ becuase then mirc actually attempts to evaluate that $identifers


on 1:connect:{ debug -i @debug debugalias }
alias debugalias {
; $1 ( not $1- ) contains the whole line of debug info
return $1
}