Author Topic: Syntax looks correct but it just won't work.  (Read 10593 times)

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Syntax looks correct but it just won't work.
« 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?
This message brought to you by the Wonderful Wizard of Oz.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Syntax looks correct but it just won't work.
« Reply #1 on: February 01, 2007, 06:32:23 PM »
What does it do?
The IceChat God

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Syntax looks correct but it just won't work.
« Reply #2 on: February 01, 2007, 06:48:26 PM »
Absolutely nothing. No error messages, no response what so ever.
This message brought to you by the Wonderful Wizard of Oz.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Syntax looks correct but it just won't work.
« Reply #3 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.
The IceChat God

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Syntax looks correct but it just won't work.
« Reply #4 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.
The IceChat God

Jacob

  • Newbie
  • *
  • Posts: 45
Re: Syntax looks correct but it just won't work.
« Reply #5 on: March 30, 2008, 08:06:40 AM »
And theres End Subp

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Syntax looks correct but it just won't work.
« Reply #6 on: March 30, 2008, 03:30:10 PM »
Thanks for replying to a message that is well over a year old.. but well found :)
The IceChat God

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Syntax looks correct but it just won't work.
« Reply #7 on: March 30, 2008, 10:54:34 PM »
And theres End Subp

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

tehe.
This message brought to you by the Wonderful Wizard of Oz.