mIRC Home    About    Download    Register    News    Help

Print Thread
#99829 06/10/04 01:55 PM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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?????

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
currentnick {
  • if (!$me || $istok(none AMS blank,$me,32) { return Current Nick:04N/A }
    return Current $+(Nick:,04,$me)
}

Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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:

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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 }

Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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!


Link Copied to Clipboard