L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 12:47:22 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: stops
Pages: [1]   Go Down
« previous next »
Print
Author Topic: stops  (Read 268 times)
0 Members and 1 Guest are viewing this topic.
Temar
BeBot Developer
Grandmaster
********
Online Online

Gender: Male
Posts: 877



WWW
stops
« on: July 16, 2007, 11:25:49 PM »

i got a problem and i cant figure out why it stopping
Code:
<?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?
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Online Online

Gender: Male
Posts: 877



WWW
Re: stops
« Reply #1 on: July 16, 2007, 11:36:23 PM »

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
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: stops
« Reply #2 on: July 17, 2007, 04: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.
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: stops
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Alreadythere
[Today at 11:42:32 AM]

Shared DB online list
by Temar
[Today at 01:55:47 AM]

relay colors
by Temar
[Today at 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11143
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 14
Total: 17
egrath
Temar

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.675 seconds with 28 queries. (Pretty URLs adds 0.061s, 4q)
Loading...