BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Diablo on September 06, 2007, 08:48:32 pm
-
Im trying to take input and assign them to two different variables as in:
if (preg_match("/^" . $this -> bot -> commpre . "fight (.+) vs (.+)/i", $msg, $arr))
$this -> bot -> send_pgroup($this -> do_fight($arr[1], $arr[2]));
What gets displays is the 2 and 3 letter of the first input (.+). The second input isnt even read. So if you put in text1 vs text2 i want to assign those to arr[1], arr[2].
Also wondering if $sender puts name of person sending command into variable?
-
(.+?)
u get the person doing the command from
function pgmsg($name, $msg)
$name = person doing command