mIRC Homepage
Posted By: clutz1572 problem with adding alias - 06/10/04 01:55 PM
hello again,

i'm having trouble with inserting an alias and it's most likely that i'm overlooking something but i can't figure out what..

this is the code:
Code:
echo 4 -s _____________________________ 12-=Welcome to 11A7M4S12=- _________________________
  echo 4 -s _________________ 12Designed by Nick & Nick (Undernet) for mIRC 6.16 _______________
  echo 4 -s ___________ 12Check the AMS.txt and AMS.hlp files for help information ___
  echo 4 -s $currentnick $+ _______ 0You have run this script4 %runtimes 0times. _____________________ 
  echo 4 -s ______________________________________________________________________________________ 


and this is the alias i'm trying to implement:
Code:
 currentnick {
if ($me == none) || ($me == AMS) || ($me == blank) {   echo 0 -sm Current Nick: $+  $+ 4 $+ N/A $+  }
else { echo 0 -s Current Nick:  $+  $+ 4 $+ $me }
} 


this is loaded from the on start event, and the problem is that when it calls the alias it seems to ad it on it's own line istead of exactly where it's supposed to be...??? and i don't understand why.

can anyone help with this?

thanks in advance smile
Posted By: LocutusofBorg Re: problem with adding alias - 06/10/04 05:10 PM
What exactly is loaded from the on start event? You have a custom identifier called $currentnick, that calls the alias as you described. You do not need to call the alias itself in the on start event. The echos you pasted will do that when they need to.
Posted By: clutz1572 Re: problem with adding alias - 07/10/04 04:18 AM
i'm trying to use the custom identifier on the on start event... but as i stated when it gets the that point where it goes to call it, it adds the indetifier return on its own line... i wanted it in with the echo line before the runtimes routine.... so the outcome would look like this:

_____Current Nick: w/e _______You have run this script 1 time ______

as it is now it looks like:

Current Nick: w/e
____ _______________You have run this script blah,blah

i hope i'm making some sense here.. anyways i added the alias code just in case i wasn't doing something correctly..
sorry about the confusion on that..

prehaps i cant use the identifier in an echo??? i don't think it matters but, ..............

any thoughts?????
Posted By: Iori Re: problem with adding alias - 07/10/04 10:16 PM
currentnick {
  • if (!$me || $istok(none AMS blank,$me,32) { return Current Nick:04N/A }
    return Current $+(Nick:,04,$me)
}
Posted By: clutz1572 Re: problem with adding alias - 08/10/04 04:59 AM
currentnick {
if (!$me || $istok(none AMS blank,$me,32) { return Current Nick:04N/A }
return Current $+(Nick:,04,$me)
}
this isn't working...?? i get this error:
/if: invalid format (line 33, aliases.ini)

which is the second part of the code: return Current $+(Nick:,04,$me)

but just the same, why didn't i think of that? hmmmmm........... :tongue:
Posted By: Iori Re: problem with adding alias - 08/10/04 05:04 AM
Oops sorry... missed a parenthesis. blush
  • if (!$me || $istok(none AMS blank,$me,32)) { return Current Nick:04N/A }

Or just remove the opening one (better IMHO)
  • if !$me || $istok(none AMS blank,$me,32) { return Current Nick:04N/A }
Posted By: clutz1572 Re: problem with adding alias - 08/10/04 01:15 PM
i did at first too blush, but after i posted i saw that. ......

and why in your opinion would removing the first ( better?
just out of curiosity......

thanks Iori, for the help!
© mIRC Discussion Forums