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 02, 2008, 11:48:48 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.5 support > Topic: multibot, one dir; preferences
Pages: [1]   Go Down
« previous next »
Print
Author Topic: multibot, one dir; preferences  (Read 283 times)
0 Members and 1 Guest are viewing this topic.
Dracutza
Apprentice
***
Offline Offline

Posts: 126


multibot, one dir; preferences
« on: March 31, 2008, 08:28:04 PM »

the very same preferences file that more or less works on 4 other bots errors out on a 5th

Quote
bot [2008-04-01 01:28:19]      [TELL]  [INC]   Dracutza: preferences

Warning: array_keys(): The first argument should be an array in P:\bot\modules\Preferences.php on line 77

Warning: Invalid argument supplied for foreach() in P:\bot\modules\Preferences.php on line 78

restarted bots and server. dumped that bots preferences tables and still get same error.
Logged
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: multibot, one dir; preferences
« Reply #1 on: March 31, 2008, 08:43:36 PM »

i see what the problem is.

where each bot got it's own preferences and preferences_def tables with the old preferences file, now with the new one there is just one global preferences and preferences_def table created.

Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: multibot, one dir; preferences
« Reply #2 on: April 01, 2008, 04:33:29 AM »

This is related to the fact that someone figured storing a true/false value was best done with a VARCHAR(10) and not a BOOL (or TINYINT(1)).

Change the call to $this -> bot -> db -> define_tablename("preferences_def", true); to read $this -> bot -> db -> define_tablename("preferences_def", "true");

This code should be changed as storing a boolean value in a VARCHAR(10) is just plain stupid. Smiley
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: multibot, one dir; preferences
« Reply #3 on: April 01, 2008, 11:36:57 AM »

tried that and no luck.

same error and still a global pref table
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: multibot, one dir; preferences
« Reply #4 on: April 01, 2008, 06:39:57 PM »

After you do that you need to remove or edit the reference in the master table name registry.

The easiest way to do this is to drop the tablenames table as defaults are created if it doesn't exist.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Dracutza
Apprentice
***
Offline Offline

Posts: 126


Re: multibot, one dir; preferences
« Reply #5 on: April 02, 2008, 08:57:48 PM »

ok 3 of 5 is not bad... can you explain why the other two throw the same error still?

They are just dumb bots atm, so I just dumped all the tables related to those two bots, deleted the ini files for each bot, and then restarted.

Quote
bot1 [2008-04-03 01:32:59]    [TELL]  [INC]   Dracutza: preferences
bot1 [2008-04-03 01:32:59]    [TELL]  [OUT]   -> Dracutza: [link]Preferences[/link]
Quote
bot2 [2008-04-03 01:32:59]    [TELL]  [INC]   Dracutza: preferences
bot2 [2008-04-03 01:32:59]    [TELL]  [OUT]   -> Dracutza: [link]Preferences[/link]

Quote
bot4 [2008-04-03 01:57:47]      [TELL]  [INC]   Dracutza: !preferences

Warning: array_keys(): The first argument should be an array in P:\bot\modules\Preferences.php on line 77

Warning: Invalid argument supplied for foreach() in P:\bot\modules\Preferences.php on line 78
bot 4[2008-04-03 01:57:47]      [TELL]  [OUT]   -> Dracutza: [link]Preferences[/link]
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.5 support > Topic: multibot, one dir; preferences
« previous next »
 
Jump to:  

Recent
!items database
by Zeephonz
[Today at 08:05:21 PM]

Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 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]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11146
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 19
Total: 21
FLGuru
Elesar1

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.314 seconds with 28 queries. (Pretty URLs adds 0.025s, 4q)
Loading...