mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Nov 2005
Posts: 4
Ok, I'm teaching myself basically as much as I can about writing scripts for mIRC. Unfortunately, like most help files, little things keeps stopping me from figuring my current work out.

Right now I want to know what I'm doing wrong, because it wont show the value of the variable.

in the Remote tab I have:
on 1:TEXT:hmm:#CLASS:/notice $nick %x hmm

in variables I have:
/set [-s]%x[1]


I have no idea what's wrong, but more the problem is have no idea what is right. Also I am running two mIRC's so that I can use the TEXT command.

Joined: Apr 2005
Posts: 72
B
Babel fish
Offline
Babel fish
B
Joined: Apr 2005
Posts: 72
im not sure what [-s]%x[1] is
but var must be:
/set %var yourtext.or.$string

bodo

Joined: Nov 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Nov 2005
Posts: 4
Ok, I guess my initial problem is with my variable. If I were trying to make a variable 'x' to equal 1 what would that look like?

And I apologise for the simplicity of this but I'm becoming confused by all the extra things put in to show me options. I can't tell what needs to be there and what doesn't.

Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
Code:
/set %x 1

.. is this what you're asking?

Joined: Nov 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Nov 2005
Posts: 4
Yes it was thank you. Now on to the script I guess. When I test it out all I get back is 'hmm' (which I put there just to make sure I got something). I still don't get a value showing for the variable.

Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
Try this. Use
Code:
/set -s %x 1

That will physically show you the variable setting set to 1.
Then use the code
Code:
on *:TEXT:*hmm*:#Class:{ //notice $nick %x hmmm }

That should work.
[Edited: Accidently had a %1 instead of %x my fault. corrected.]

Last edited by drc4; 30/11/05 10:19 PM.
Joined: Nov 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Nov 2005
Posts: 4
Nope, I still only recieve the 'hmmm'

Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
notice that I just edited the post. I accidently put a %1 variable instead of %x. Just got ahead of myself. Try the edited code above. And also note that you can't test it on yourself. Someone else has to manually type hmm into the channel #class.

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I am rather curious where you have put the /set %x 1
in any mIRC channel, status or message window type
/set %x 1

youir remote code:
on 1:TEXT:hmm:#CLASS:/notice $nick %x hmm

try reversing the %x anfd the hmm

on 1:TEXT:hmm:#CLASS:/notice $nick Hmmm %x

note that the other person can only type hmm not hmmm or hmm test or any other word with the hmm the way that you have it
on 1:TEXT:* hmm*:#CLASS:/notice $nick %x hmm
this way would allow hmm anywhere in the string of text
like hey hmmboy or hmmmmm test

note also you have restricted the channel this will work in to #CLASS

does this help?

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you didn't know, you can NOT activate your own scripts by typing in that channel. Someone else has to type 'hmm' in #class. If you want to test your own code, you can use * instead of #CLASS. Example:

on 1:TEXT:hmm:*:/notice $nick %x hmm

To test with this code, open a query window to yourself (in the status window, type: //query $me) then type 'hmm' (without the quotes). If you have previously set the %x variable (in the status window, type: /set -s %x 1), you will receive a notice from yourself that says '1 hmm'.

-genius_at_work

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
one other thing, not critical but in scripts the / is not needed before a command as everything inside the string is considered a command

so:
on 1:TEXT:hmm:*:/notice $nick %x hmm

doesn''t need the /
on 1:TEXT:hmm:*:notice $nick %x hmm


Link Copied to Clipboard