In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

You are here: Big Brother Bot ForumSupport ForumsInstallation Support (Moderator: MordyT)xlrstatsplugin Error: unsupported operand type(s) for -: 'NoneType' and 'int'
Pages: [1]   Go Down
  Print  
Author Topic: xlrstatsplugin Error: unsupported operand type(s) for -: 'NoneType' and 'int'  (Read 1210 times) Bookmark and Share
Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3347
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« on: February 24, 2010, 01:35:22 PM »

I did a fresh install of the latest xlrstats (from xlr8or dev repo) deleting all previous xlr_* tables and creating tables with the xlrstats.sql file.
but I still hit this error :

Code:
100224 22:30:02 DEBUG   PublistPlugin: Sending heartbeat to B3 master...
100224 22:30:02 VERBOSE RCON sending (91.121.95.52:27960) status
100224 22:30:02 BOT     Starting Plugin xlrstats
100224 22:30:02 DEBUG   AdminPlugin: Command "xlrhide (None)" registered with cmd_xlrhide for level (60, 100)
100224 22:30:02 DEBUG   AdminPlugin: Command "xlrstats (None)" registered with cmd_xlrstats for level (1, 100)
100224 22:30:02 DEBUG   AdminPlugin: Command "xlrtopstats (None)" registered with cmd_xlrtopstats for level (2, 100)
100224 22:30:02 DEBUG   Register Event: Client Join Team: XlrstatsPlugin
100224 22:30:02 DEBUG   Register Event: Client Kill: XlrstatsPlugin
100224 22:30:02 DEBUG   Register Event: Client Team Kill: XlrstatsPlugin
100224 22:30:02 DEBUG   Register Event: Client Suicide: XlrstatsPlugin
100224 22:30:02 DEBUG   Register Event: Game Round Start: XlrstatsPlugin
100224 22:30:02 DEBUG   Register Event: Client Action: XlrstatsPlugin
100224 22:30:02 DEBUG   Register Event: Client Damage: XlrstatsPlugin
100224 22:30:02 DEBUG   XlrstatsPlugin: Got client id for WORLD: 6275
100224 22:30:02 VERBOSE XlrstatsPlugin: Checking if we need to update tables for version 2.0.0
100224 22:30:02 DEBUG   XlrstatsPlugin: Optimizing Table(s): xlr_playerstats, xlr_weaponstats, xlr_weaponusage, xlr_bodyparts, xlr_playerbody, xlr_opponents, xlr_mapstats, xlr_playermaps, xlr_actionstats, xlr_playeractions
100224 22:30:02 DEBUG   XlrstatsPlugin: Optimize Success
100224 22:30:02 DEBUG   XlrstatsPlugin: Calculating kill_bonus
100224 22:30:02 INFO    STDOUT Error: unsupported operand type(s) for -: 'NoneType' and 'int'
  File "/home/ubuteam/b3/__init__.py", line 160, in start
    console.start()
  File "/home/ubuteam/b3/parser.py", line 314, in start
    self.startPlugins()
  File "/home/ubuteam/b3/parser.py", line 533, in startPlugins
    p.onStartup()
  File "/home/ubuteam/b3/plugin.py", line 148, in onStartup
    self.startup()
  File "/home/ubuteam/b3-extplugins/xlrstats.py", line 201, in startup
    self.calculateKillBonus()
  File "/home/ubuteam/b3-extplugins/xlrstats.py", line 1437, in calculateKillBonus
    diff = max - self.defaultskill

100224 22:30:02 INFO    STDOUT

100224 22:30:02 INFO    STDOUT 223
100224 22:30:02 INFO    STDOUT

100224 22:30:02 INFO    HaxbusterurtPlugin: checking all new clients guid

I somewhat fixed that problem with:
Quote
       q = 'SELECT MAX(skill) AS max_skill FROM %s' % self.playerstats_table
        cursor = self.query(q)
        r = cursor.getRow()
        max = r['max_skill']
        if max is None:
            max = self.defaultskill

        diff = max - self.defaultskill
        if diff < 0:
            self.kill_bonus = 2.0
but I'm not sure is this is a clever default value
« Last Edit: February 24, 2010, 01:44:30 PM by Courgette » Logged


Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoDUO, CoD2, CoD4, RO2, BF3, KF
Posts: 44
Offline Offline
WWW
« Reply #1 on: February 24, 2010, 01:42:37 PM »

exactly my problem where do u insert that code?
Logged

Senior Dev.
*
OS: Linux
Type: Home user
Posts: 3347
Offline Offline
WWW
Support Specialty: B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
« Reply #2 on: February 24, 2010, 01:44:53 PM »

I just added the green part. So look for what's around
Logged

Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoDUO, CoD2, CoD4, RO2, BF3, KF
Posts: 44
Offline Offline
WWW
« Reply #3 on: February 24, 2010, 03:07:26 PM »

fixed it ty
Logged

[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2009
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #4 on: February 25, 2010, 02:23:08 AM »

Thanks for the heads up, I will fix this asap. And yes, The resulting kill_bonus is the proper default to start with.
« Last Edit: February 25, 2010, 02:26:38 AM by xlr8or » Logged

Tags: xlrstats 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal