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: stops  (Read 2975 times)

0 Members and 1 Guest are viewing this topic.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
stops
« on: July 17, 2007, 06:25:49 am »
i got a problem and i cant figure out why it stopping
Code: [Select]
<?php

function 
connect()
{
$result $this -> bot -> db -> select("SELECT * FROM #___automsgs"MYSQL_ASSOC);
$highestmsg $this -> bot -> db -> select("SELECT ID FROM #___automsgs ORDER BY ID DESC LIMIT 1"MYSQL_ASSOC);
if (!empty($result))
{
$online $this -> bot -> db -> select("SELECT * FROM #___online WHERE botname = '" $this -> bot -> botname "' AND status_gc = 1"MYSQL_ASSOC);
if (!empty($online))
{
foreach ($online as $member)
{
$result2 "";
$result2 $this -> bot -> db -> select("SELECT * FROM #___users WHERE nickname = '".$member[nickname]."'"MYSQL_ASSOC);
foreach ($result as $msg)
{
if ($msg[ID] > $result2[lastmsg])
{
$this -> bot -> send_tell($member[nickname], "Mass Message From ##highlight##".$msg[added_by]."##end##  ".$msg[msg].""1);
}
}
echo "meep ".$highestmsg[0][ID]."\n"doe
$this -> bot -> db -> query("UPDATE #___users SET lastmsg = '".$highestmsg[0][ID]."' WHERE nickname = '".$member[nickname]."'");
}
}
}
}

?>

now it sends out the mass message but thats it,                
echo "meep ".$highestmsg[0][ID]."\n";
doesnt happen or the update after it
any idea why?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: stops
« Reply #1 on: July 17, 2007, 06:36:23 am »
And also is it possible to add a delay to that part above, because i want to make sure bot updates online list before it does it

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: stops
« Reply #2 on: July 17, 2007, 11:37:31 am »
Lines like $member[nickname] should be $member['nickname'], the index is a string. Even if it works on some systems other throw out warnings or errors, depending on the php settings.

 

* 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: 218
  • 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