Categories > TinyButStrong general (FR) >

Merge block fail with big object

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: TiTi
Date: 2010-05-30
Time: 01:10

Merge block fail with big object

Salut,

J'ai un objet PHP5 avec 119 propriétés, un simple MergeBlock échoue et génère l'erreur "Data source Id 'tf2stats' is unsupported because function 'tbsdb_tf2stats_open' is not found".

Je suis allé voir dans la classe TBS, ca correspond à la ligne 2532 mais je crois qu'il est un peu tard pour que j'apprenne le fonctionnement interne de TBS :p

Ci-dessous un print_r de mon objet suivi de l'erreur.
Bon c'est peut-être autre chose que le grand nombre de propriétés (j'avoue c pas top), mais je ne vois que ca pour le moment.

++

tf2stats Object
(
    [player:private] => 76561197970733145
    [accumulatedPoints:private] => 45366
    [Demoman_playtimeSeconds:private] => 420720
    [Demoman_ipointsscored:private] => 24
    [Demoman_inumberofkills:private] => 17
    [Demoman_ikillassists:private] => 8
    [Demoman_ipointcaptures:private] => 6
    [Demoman_ipointdefenses:private] => 3
    [Demoman_idamagedealt:private] => 3883
    [Demoman_ibuildingsdestroyed:private] => 6
    [Demoman_idominations:private] => 4
    [Demoman_irevenge:private] => 2
    [Demoman_inuminvulnerable:private] => 0
    [Demoman_iplaytime:private] => 783
    [Soldier_playtimeSeconds:private] => 369533
    [Soldier_ipointsscored:private] => 24
    [Soldier_inumberofkills:private] => 13
    [Soldier_ikillassists:private] => 10
    [Soldier_ipointcaptures:private] => 11
    [Soldier_ipointdefenses:private] => 4
    [Soldier_idamagedealt:private] => 3265
    [Soldier_ibuildingsdestroyed:private] => 4
    [Soldier_idominations:private] => 3
    [Soldier_irevenge:private] => 2
    [Soldier_inuminvulnerable:private] => 0
    [Soldier_iplaytime:private] => 517
    [Engineer_playtimeSeconds:private] => 181430
    [Engineer_ipointsscored:private] => 32
    [Engineer_inumberofkills:private] => 15
    [Engineer_isentrykills:private] => 11
    [Engineer_ikillassists:private] => 12
    [Engineer_ipointcaptures:private] => 3
    [Engineer_ipointdefenses:private] => 3
    [Engineer_idamagedealt:private] => 3665
    [Engineer_ibuildingsdestroyed:private] => 2
    [Engineer_idominations:private] => 2
    [Engineer_irevenge:private] => 1
    [Engineer_inuminvulnerable:private] => 0
    [Engineer_iplaytime:private] => 597
    [Engineer_ibuildingsbuilt:private] => 16
    [Engineer_ihealthpointshealed:private] => 0
    [Engineer_inumteleports:private] => 39
    [Medic_playtimeSeconds:private] => 161671
    [Medic_ipointsscored:private] => 56
    [Medic_inumberofkills:private] => 4
    [Medic_ikillassists:private] => 29
    [Medic_ipointcaptures:private] => 4
    [Medic_ipointdefenses:private] => 2
    [Medic_idamagedealt:private] => 1174
    [Medic_ibuildingsdestroyed:private] => 1
    [Medic_idominations:private] => 4
    [Medic_irevenge:private] => 2
    [Medic_inuminvulnerable:private] => 11
    [Medic_iplaytime:private] => 1133
    [Medic_ihealthpointshealed:private] => 15872
    [Heavy_playtimeSeconds:private] => 116339
    [Heavy_ipointsscored:private] => 31
    [Heavy_inumberofkills:private] => 25
    [Heavy_ikillassists:private] => 9
    [Heavy_ipointcaptures:private] => 7
    [Heavy_ipointdefenses:private] => 4
    [Heavy_idamagedealt:private] => 5327
    [Heavy_ibuildingsdestroyed:private] => 7
    [Heavy_idominations:private] => 5
    [Heavy_irevenge:private] => 2
    [Heavy_inuminvulnerable:private] => 0
    [Heavy_iplaytime:private] => 522
    [Scout_playtimeSeconds:private] => 108543
    [Scout_ipointsscored:private] => 24
    [Scout_inumberofkills:private] => 7
    [Scout_ikillassists:private] => 5
    [Scout_ipointcaptures:private] => 12
    [Scout_ipointdefenses:private] => 3
    [Scout_idamagedealt:private] => 1224
    [Scout_ibuildingsdestroyed:private] => 3
    [Scout_idominations:private] => 1
    [Scout_irevenge:private] => 2
    [Scout_inuminvulnerable:private] => 0
    [Scout_iplaytime:private] => 612
    [Spy_playtimeSeconds:private] => 96784
    [Spy_ipointsscored:private] => 15
    [Spy_inumberofkills:private] => 7
    [Spy_ikillassists:private] => 5
    [Spy_ipointcaptures:private] => 3
    [Spy_ipointdefenses:private] => 2
    [Spy_idamagedealt:private] => 1574
    [Spy_ibuildingsdestroyed:private] => 6
    [Spy_idominations:private] => 1
    [Spy_irevenge:private] => 2
    [Spy_inuminvulnerable:private] => 0
    [Spy_iplaytime:private] => 299
    [Spy_ibackstabs:private] => 7
    [Spy_iheadshots:private] => 1
    [Spy_ihealthpointsleached:private] => 163
    [Pyro_playtimeSeconds:private] => 80357
    [Pyro_ipointsscored:private] => 81
    [Pyro_inumberofkills:private] => 76
    [Pyro_ikillassists:private] => 34
    [Pyro_ipointcaptures:private] => 3
    [Pyro_ipointdefenses:private] => 4
    [Pyro_idamagedealt:private] => 9633
    [Pyro_ibuildingsdestroyed:private] => 4
    [Pyro_idominations:private] => 11
    [Pyro_irevenge:private] => 3
    [Pyro_inuminvulnerable:private] => 0
    [Pyro_iplaytime:private] => 697
    [Sniper_playtimeSeconds:private] => 72134
    [Sniper_ipointsscored:private] => 21
    [Sniper_inumberofkills:private] => 14
    [Sniper_ikillassists:private] => 7
    [Sniper_ipointcaptures:private] => 3
    [Sniper_ipointdefenses:private] => 2
    [Sniper_idamagedealt:private] => 2177
    [Sniper_ibuildingsdestroyed:private] => 2
    [Sniper_idominations:private] => 2
    [Sniper_irevenge:private] => 1
    [Sniper_inuminvulnerable:private] => 0
    [Sniper_iplaytime:private] => 373
    [Sniper_iheadshots:private] => 6
)
<br /><b>TinyButStrong Error</b> when merging block &#91;Array] : Data source Id 'tf2stats' is unsupported because function 'tbsdb_tf2stats_open' is not found.<br />
By: Skrol29
Date: 2010-05-30
Time: 13:39

Re: Merge block fail with big object

Salut Titi,

Tu as ce message parce que tu n'utilise pas MergeBlock() correctement.
Le deuxième argument doit être ta source de données. Si ta source est un tableau d'objet alors il faut mettre 'array'. Si ta source est un objet seul, pas encapsulé dans un tableau alors je crois que ça ne marche pas.
Il faut donc mettre
$TBS->MergeBlock('mon_bloc', 'array', $TableauObjets);
ou si tu as un seul objet :
$TBS->MergeBlock('mon_bloc', 'array', array($MonObjet));

Si le second argument est un objet alors TBS essai de l'utiliser comme un moyen de récupérer les données (source de donnée), d'où l'erreur que tu as.
By: TiTi
Date: 2010-05-31
Time: 20:12

Re: Merge block fail with big object

En effet belle erreure de ma part, surement dûe à l'heure tardive ^^

Merci :)