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

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

Author Topic: multibot, one dir; preferences  (Read 2039 times)

0 Members and 1 Guest are viewing this topic.

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
multibot, one dir; preferences
« 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

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.

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: multibot, one dir; preferences
« Reply #1 on: April 01, 2008, 03:43:36 am »
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.


Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: multibot, one dir; preferences
« Reply #2 on: April 01, 2008, 11: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. :)
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: multibot, one dir; preferences
« Reply #3 on: April 01, 2008, 06:36:57 pm »
tried that and no luck.

same error and still a global pref table

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: multibot, one dir; preferences
« Reply #4 on: April 02, 2008, 01:39:57 am »
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.
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Dracutza

  • BeBot Apprentice
  • ***
  • Posts: 126
  • Karma: +0/-0
Re: multibot, one dir; preferences
« Reply #5 on: April 03, 2008, 03:57:48 am »
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]

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


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


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 551
  • 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