IceChat Forums

IceChat 5 Scripting => Scripting => Topic started by: DarkStar on February 01, 2007, 05:52:25 PM

Title: Syntax looks correct but it just won't work.
Post by: DarkStar on February 01, 2007, 05:52:25 PM
this just doesn't work right. Looks like it should though..

Code: [Select]
sub changenick(base,text,servernumber)
if len(text) <> 0 then SendCommand "/nick " & base & "|" & replace(text," ","_"),servernumber else SendCommand "/nick " & base,servernumber
if len(text)=0 then SendCommand "/ns identify " & getinifile("passwords.ini",getidentifier("$network",servernumber),base,""),servernumber
End Subp

I made this alias. Basically, /md changes my nick to 'Mr_Doodle'. if i type /md text it should change my nick to 'Mr_Doodle|text'.


/md //! changenick Mr_Doodle|$1-|$currentservernumber

See anything I did wrong?
Title: Re: Syntax looks correct but it just won't work.
Post by: Snerf on February 01, 2007, 06:32:23 PM
What does it do?
Title: Re: Syntax looks correct but it just won't work.
Post by: DarkStar on February 01, 2007, 06:48:26 PM
Absolutely nothing. No error messages, no response what so ever.
Title: Re: Syntax looks correct but it just won't work.
Post by: Snerf on February 01, 2007, 06:59:47 PM
Excellent.
Well, when I have some time, I'll give it a whir and see whats wrong.
Title: Re: Syntax looks correct but it just won't work.
Post by: Snerf on February 01, 2007, 09:54:16 PM
The problem layes with /md //! changenick Mr_Doodle|$1-|$currentservernumber

It was not properly parsing out the $identifiers, cuz it parses em first, and then splits them, not the other way around.
A temp fix is to place spaces between.

/md //! changenick Mr_Doodle| $1 -| $currentservernumber

7.11 will remove the extra spaces that it inserts in there, I will fix that.
Title: Re: Syntax looks correct but it just won't work.
Post by: Jacob on March 30, 2008, 08:06:40 AM
And theres End Subp
Title: Re: Syntax looks correct but it just won't work.
Post by: Snerf on March 30, 2008, 03:30:10 PM
Thanks for replying to a message that is well over a year old.. but well found :)
Title: Re: Syntax looks correct but it just won't work.
Post by: DarkStar on March 30, 2008, 10:54:34 PM
And theres End Subp

I personally cant believe I did something s trivial... >.<

tehe.