collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Getting complete input to display  (Read 3342 times)

0 Members and 1 Guest are viewing this topic.

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Getting complete input to display
« on: September 06, 2007, 08:48:32 pm »
Im trying to take input and assign them to two different variables as in:

Code: [Select]

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?
« Last Edit: September 06, 2007, 10:12:51 pm by Diablo »

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Getting complete input to display
« Reply #1 on: September 06, 2007, 11:09:00 pm »
(.+?)

u get the person doing the command from
   function pgmsg($name, $msg)
$name = person doing command
« Last Edit: September 06, 2007, 11:10:42 pm by Temar »

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 222
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal