mIRC Homepage
Posted By: killemall_ Need some help in remote scripting - 09/09/04 01:25 PM
I'm new to IRC (started on Friday) and I got confused by the fact that it seems a variable is not always accessable.

Here's what I wrote:

---------- script start ----------
- in remote variables (remote.ini):
%tc = #tommys-channel

- in remote script (script.ini)
on 1:connect: {
echo channel name is: %tc
if ($network == TomNet) { join #Beginner,%tc
topic #tommys-channel today: one topic for free! laugh
mode #tommys-channel +n-t+l 10
}
}
---------- script end ----------

the echo command is printed out correct (channel name is: = #tommys-channel). But it is not working in the join command anymore (%tc No such channel).

Any idea what the problem can be?

Client: mIRC 6.16 (not registered yet) under M$ W2k, no add-ons or whatever.

I have a irc server (BewareIRC in W2k) running so I can tryout the irc features without working on a productive environment.
And with that server I tried the above scirpt.

cheers killemall

<edit>the echo command is also working when placed in the if(...) {} part.</edit>
Posted By: Zyzzyx26 Re: Need some help in remote scripting - 09/09/04 01:39 PM
I am not sure this will help, but it won't hurt to give it a try smile

Code:
on 1:connect: {
 echo channel name is: %tc
  if ($network == TomNet) { 
   join #Beginner,%tc
   topic #tommys-channel today: one topic for free! 
   mode #tommys-channel +n-t+l 10
  }
}

I have just put the /join command in a new line, like the /topic and /mode; maybe that will fix it?

BTW, +n-t+l 10 can be expressed by -t+nl 10 or +nl-t 10. It is exactly the same, only a few chars shorter wink

Hope this helps,
Zyzzyx
Posted By: killemall_ Re: Need some help in remote scripting - 09/09/04 01:50 PM
Hi Zyzzyx26,

Thanx for ur answer. Unfortunately it didn't work but it was worth a try cool

Thanx for the tip about setting the modes!

cu killemall
Posted By: Zyzzyx26 Re: Need some help in remote scripting - 09/09/04 01:55 PM
hmm.. try this: join #Beginner,$eval(%tc,2)

smile
Posted By: Online Re: Need some help in remote scripting - 09/09/04 04:05 PM
In the variables section there shouldn't be a =, so delete it.

Also, change the join command to: /join #beginner, [color:blue]$+ %tc[/color]
Posted By: killemall_ Re: Need some help in remote scripting - 09/09/04 04:23 PM
Ok, didn't help either confused . It really looks like it just don't evaluate this variable.

I changed the name (u never know smile, put the two joins on one line each, did the eval() thing, declared the var local, put an echo line before and after the /join. It works for /echo but not for /join (could it maybe a bug?)

-> it just don't evaluate the f#@*er!
Posted By: killemall_ Re: Need some help in remote scripting - 09/09/04 04:32 PM
U r my hero Online!

So mIRC is really picky about spaces then? It doesn't accept any spaces between the channel list (/join #Beginner, #irc isn't working) but can't evaluate a variable if the space is missing?

That's a rather strange behavior but I memorize it, thanx again!!

killemall
© mIRC Discussion Forums