Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!

Author Topic: Trying to rename penalties table  (Read 1323 times)

Offline Spoon

  • Sr. Member
  • ****
  • Posts: 255
    • EHD Gaming
Trying to rename penalties table
« on: November 25, 2013, 06:35:53 PM »
I'm trying to make the penalties table easily re-nameable as i plan on having 7-8 servers running on the same game. I would like all the clients/admins to use the same database id across all the servers but would like the penalties to be separate.
Would of following change I've made on lines 767, 780, 797, 807, 815, 822 use the variable I've added on line 90?

http://ehdfiles.co.uk/spoon/storage.py

Also if this works how would i go about adding it as a config option in the b3.xml?

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: Trying to rename penalties table
« Reply #1 on: November 25, 2013, 08:13:33 PM »
Would of following change I've made on lines 767, 780, 797, 807, 815, 822 use the variable I've added on line 90?
it does not. Replace penaltie_table with self.penaltie_table in all those lines but the line 90.

Quote
Also if this works how would i go about adding it as a config option in the b3.xml?
why not  :)

Offline Spoon

  • Sr. Member
  • ****
  • Posts: 255
    • EHD Gaming
Re: Trying to rename penalties table
« Reply #2 on: November 25, 2013, 08:40:15 PM »
Ok, I've change them all to self.penaltie_table. To add it as a config option int he b3.xml do i change line 90 to
Code: [Select]
penaltie_table = self.config.get('b3', 'penaltie_table')
or
Code: [Select]
penaltie_table = self.console.config.get('b3', 'penaltie_table')
and add <set name="penaltie_table">penalties</set> in the b3 settings.

Offline byterry1

  • Newbie
  • *
  • Posts: 1
Re: Trying to rename penalties table
« Reply #3 on: November 29, 2013, 08:37:43 AM »
Interesting as well I will get back to her on it.

 


Rate this page +1 at Google Search

anything