$arg() existence validation

Hi,
I am new to WizeBot, I enjoy the features but some are a little confusing still.

I want to make a command that requires $arg(1) and $arg(2) to be populated.

For example:
A command called ‘!slap’ that replies with “You slapped $arg(1)!” would reply with “You Slapped !” if no user was passed to the bot, how can i ensure the $arg variable is populated before processing?

Hello,
Just use $arg(1,1,1) :slight_smile :

$arg(1,2,3) = 1: Index of argument, 2: Default text (if argument not found), 3: Do not execute (send text) if argument not found.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.