mIRC Home    About    Download    Register    News    Help

Print Thread
#116509 05/04/05 02:36 PM
Joined: Apr 2005
Posts: 3
D
doggy Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Apr 2005
Posts: 3
Code:
 menu channel {
  .SLAPPIE!!
  .tuna slap: /set %who $?="who do you wich to slap? ;)" | /me slaps %who with a tuna | /unset %who 
  .smelly tuna slap: /set %who $?="who do you wich to slap? ;)" | /me slaps %who with a smelly tuna | /unset %who 
  .specify: /set %who $?="who do you wich to slap? ;)"| /set %object $?="object to slap with:" | /me slaps %who with a %object | /unset %who | /unset %object 


}  


this code is supposed to slap someone. but on specify there are som errors when i use it and typ in %who = "a" and %object = "b" it returns "* doggy slaps a /set b with a could someone help me out on this?

#116510 05/04/05 03:30 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Your code was fine however, spacing is vital.

Code:
  .specify: /set %who $?="who do you wich to slap? ;)" | /set %object $?="object to slap with:[color:red]"|[/color] /me slaps %who with a %object | /unset %who | /unset %object 


Should be

Code:
  .specify: /set %who $?="who do you wich to slap? ;)" | /set %object $?="object to slap with:[color:red]" |[/color] /me slaps %who with a %object | /unset %who | /unset %object  


So altogether you should now have..

Code:
menu channel { 
  .SLAPPIE!! 
  .tuna slap: /set %who $?="who do you wich to slap? ;)" | /me slaps %who with a tuna | /unset %who   
  .smelly tuna slap: /set %who $?="who do you wich to slap? ;)" | /me slaps %who with a smelly tuna | /unset %who   
  .specify: /set %who $?="who do you wich to slap? ;)" | /set %object $?="object to slap with:" | /me slaps %who with a %object | /unset %who | /unset %object 
} 

#116511 06/04/05 03:26 AM
Joined: Sep 2004
Posts: 40
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Sep 2004
Posts: 40
To make it even smaller you can just use var instead of set, that way you dont need to unset it.

us3rX

#116512 06/04/05 03:36 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Too true. smile

#116513 06/04/05 06:02 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
Noting the totally transitory nature of the variables, the following could also apply:

Code:
  
menu channel {
  SLAPPIE!!   
  .tuna slap: me slaps $?="who do you wich to slap? ;)" with a tuna
  .smelly tuna slap: me slaps $?="who do you wich to slap? ;)"  with a smelly tuna
  .specify: me slaps $?="who do you wich to slap? ;)" with a $?="object to slap with:"
} 


Note the missing "." from the front of "Slappie" - this fixes a hierarchy issue. I also left 'wish' as 'wich" for you!

Cheers,

DK


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!

Link Copied to Clipboard