mIRC Homepage

debug

Posted By: naki

debug - 01/09/06 03:44 PM

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)
Posted By: Doqnach

Re: debug - 01/09/06 04:02 PM

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
Posted By: naki

Re: debug - 01/09/06 04:14 PM

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.
Posted By: SCNDRL

Re: debug - 01/09/06 09:24 PM

try this ;

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

Re: debug - 01/09/06 10:52 PM

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
}
© 2022 mIRC Discussion Forums