BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => BeBot 0.5 support => Topic started by: Dracutza on April 01, 2008, 03:28:04 am
-
the very same preferences file that more or less works on 4 other bots errors out on a 5th
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.
-
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.
-
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. :)
-
tried that and no luck.
same error and still a global pref table
-
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.
-
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.
bot1 [2008-04-03 01:32:59] [TELL] [INC] Dracutza: preferences
bot1 [2008-04-03 01:32:59] [TELL] [OUT] -> Dracutza: [link]Preferences[/link]
bot2 [2008-04-03 01:32:59] [TELL] [INC] Dracutza: preferences
bot2 [2008-04-03 01:32:59] [TELL] [OUT] -> Dracutza: [link]Preferences[/link]
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]