SVN[1422]Update error - Member Pet Update

Posts from previous Beta sessions

SVN[1422]Update error - Member Pet Update

Postby mdeshane » Thu Nov 01, 2007 11:39 pm

The SQL Error:

1264: Out of range value adjusted for column 'melee_hit' at row 1
SQL:
UPDATE `roster_pets` SET `member_id` = '279', `name` = 'Mizoid', `slot` = '0', `stat_int` = '32', `stat_int_c` = '32', `stat_int_b` = '0', `stat_int_d` = '0', `stat_agl` = '117', `stat_agl_c` = '117', `stat_agl_b` = '0', `stat_agl_d` = '0', `stat_sta` = '299', `stat_sta_c` = '402', `stat_sta_b` = '103', `stat_sta_d` = '0', `stat_str` = '151', `stat_str_c` = '151', `stat_str_b` = '0', `stat_str_d` = '0', `stat_spr` = '91', `stat_spr_c` = '91', `stat_spr_b` = '0', `stat_spr_d` = '0', `dodge` = '20.36', `parry` = '9.76', `block` = '0', `mitigation` = '44.99', `stat_armor` = '5601', `stat_armor_c` = '7488', `stat_armor_b` = '1887', `stat_armor_d` = '0', `stat_def` = '330', `stat_def_c` = '330', `stat_def_b` = '0', `stat_def_d` = '0', `stat_block` = '0', `stat_block_c` = '0', `stat_block_b` = '0', `stat_block_d` = '0', `stat_parry` = '0', `stat_parry_c` = '0', `stat_parry_b` = '0', `stat_parry_d` = '0', `stat_defr` = '0', `stat_defr_c` = '0', `stat_defr_b` = '0', `stat_defr_d` = '0', `stat_dodge` = '24', `stat_dodge_c` = '25', `stat_dodge_b` = '1', `stat_dodge_d` = '0', `stat_res_ranged` = '0', `stat_res_spell` = '0', `stat_res_melee` = '0', `res_holy` = '0', `res_holy_c` = '0', `res_holy_b` = '0', `res_holy_d` = '0', `res_frost` = '96', `res_frost_c` = '96', `res_frost_b` = '0', `res_frost_d` = '0', `res_arcane` = '60', `res_arcane_c` = '60', `res_arcane_b` = '0', `res_arcane_d` = '0', `res_fire` = '60', `res_fire_c` = '60', `res_fire_b` = '0', `res_fire_d` = '0', `res_shadow` = '60', `res_shadow_c` = '60', `res_shadow_b` = '0', `res_shadow_d` = '0', `res_nature` = '64', `res_nature_c` = '64', `res_nature_b` = '0', `res_nature_d` = '0', `melee_power` = '282', `melee_power_c` = '629', `melee_power_b` = '347', `melee_power_d` = '0', `melee_hit` = '', `melee_hit_c` = '0', `melee_hit_b` = '0', `melee_hit_d` = '0', `melee_crit` = '', `melee_crit_c` = '0', `melee_crit_b` = '0', `melee_crit_d` = '0', `melee_haste` = '', `melee_haste_c` = '0', `melee_haste_b` = '0', `melee_haste_d` = '0', `melee_power_dps` = '44.9', `melee_mhand_speed` = '2.00', `melee_mhand_dps` = '96.9', `melee_mhand_mindam` = '179', `melee_mhand_maxdam` = '208', `melee_mhand_rating` = '330', `melee_mhand_rating_c` = '330', `melee_mhand_rating_b` = '0', `melee_mhand_rating_d` = '0', `melee_range_tooltip` = 'Main Hand\nAttack Speed (seconds): 2.48\nDamage: 455 - 559\nDamage per Second: 204.7', `melee_power_tooltip` = 'Increases damage with melee weapons by 44.9 damage per second.', `level` = '66', `health` = '4688', `mana` = '100', `power` = 'Focus', `xp` = '26508:183524', `usedtp` = '307', `totaltp` = '330', `type` = 'Cat', `loyalty` = '(Loyalty Level 6) Best Friend', `icon` = 'ability_hunter_pet_cat' WHERE `pet_id` = '2'
File: lib\dbal\mysql.php
Line: 207

update_pet function output:

lib\update.lib.php
Line: 3235
Function Called: update_pet
Arguments:
279
Array ( [Type] => Cat [TalentPoints] => 330 [Power] => Focus [Mana] => 100 [TalentPointsUsed] => 307 [Slot] => 0 [Health] => 4688 [Attributes] => Array ( [Stats] => Array ( [Intellect] => 32:0:0 [Agility] => 117:0:0 [Stamina] => 299:103:0 [Strength] => 151:0:0 [Spirit] => 91:0:0 ) [Melee] => Array ( [AttackPower] => 282:347:0 [AttackPowerDPS] => 44.9 [MainHand] => Array ( [AttackRating] => 330 [AttackDPS] => 96.9 [AttackSpeed] => 2.00 [DamageRange] => 179:208 ) [DamageRangeTooltip] => Main Hand
Attack Speed (seconds): 2.48
Damage: 455 - 559
Damage per Second: 204.7 [AttackPowerTooltip] => Increases damage with melee weapons by 44.9 damage per second. ) [Resists] => Array ( [Holy] => 0:0:0 [Arcane] => 60:0:0 [Shadow] => 60:0:0 [Fire] => 60:0:0 [Frost] => 96:0:0 [Nature] => 64:0:0 ) [Buffs] => Array ( [1] => Array ( [Icon] => Ability_TrueShot [Tooltip] => Trueshot Aura
Increases attack power by 100. [Name] => Trueshot Aura [Rank] => Rank 3 ) ) [Defense] => Array ( [BlockRating] => 0:0:0 [Defense] => 330:0:0 [BlockChance] => 0 [ArmorReduction] => 44.99 [ParryRating] => 0:0:0 [Armor] => 5601:1887:0 [DodgeRating] => 24:1.49:0 [DodgeChance] => 20.36 [DefenseRating] => 0:0:0 [DefensePercent] => 0 [ParryChance] => 9.76 [Resilience] => Array ( [Ranged] => 0 [Spell] => 0 [Melee] => 0 ) ) ) [Name] => Mizoid [Experience] => 26508:183524 [SpellBook] => Array ( [Count] => 12 [Spells] => Array ( [Prowl] => Array ( [Icon] => Ability_Druid_SupriseAttack [Rank] => Rank 1 ) [Frost Resistance] => Array ( [Icon] => Spell_Frost_FrostWard [Rank] => Rank 3 ) [Great Stamina] => Array ( [Icon] => Spell_Nature_UnyeildingStamina [Rank] => Rank 5 ) [Shadow Resistance] => Array ( [Icon] => Spell_Shadow_AntiShadow [Rank] => Rank 2 ) [Fire Resistance] => Array ( [Icon] => Spell_Fire_FireArmor [Rank] => Rank 2 ) [Growl] => Array ( [Icon] => Ability_Physical_Taunt [Rank] => Rank 7 ) [Nature Resistance] => Array ( [Icon] => Spell_Nature_ResistNature [Rank] => Rank 2 ) [Arcane Resistance] => Array ( [Icon] => Spell_Nature_StarFall [Rank] => Rank 2 ) [Dash] => Array ( [Icon] => Ability_Druid_Dash [Rank] => Rank 2 ) [Claw] => Array ( [Icon] => Ability_Druid_Rake [Rank] => Rank 6 ) [Avoidance] => Array ( [Icon] => Spell_Magic_LesserInvisibilty [Rank] => Passive ) [Natural Armor] => Array ( [Icon] => Spell_Nature_SpiritArmor [Rank] => Rank 7 ) ) ) [Level] => 66 [Icon] => Ability_Hunter_Pet_Cat [Loyalty] => (Loyalty Level 6) Best Friend )


The page also kicked out the following PHP errors.

PHP Errorslib\update.lib.php
Notice line 572: Undefined variable: char_name
Notice line 2770: Undefined index: HitRating
Notice line 2771: Undefined index: CritRating
Notice line 2772: Undefined index: HasteRating
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

SVN[1422]Update error - Member Pet Update

Postby zanix » Fri Nov 02, 2007 12:40 am

Replace
Code: Select all
   function add_rating( $row_name, $data )
   {
      $data = explode(':',$data);
      $data[0] = ( isset($data[0]) ? $data[0] : 0 );
      $data[1] = ( isset($data[1]) ? $data[1] : 0 );
      $data[2] = ( isset($data[2]) ? $data[2] : 0 );
      $this->add_value( $row_name, $data[0] );
      $this->add_value( $row_name . '_c', round( $data[0]+$data[1]+$data[2] ) );
      $this->add_value( $row_name . '_b', round( $data[1] ) );
      $this->add_value( $row_name . '_d', round( $data[2] ) );
   }


With this
Code: Select all
   function add_rating( $row_name, $data )
   {
      $data = explode(':',$data);
      $data[0] = ( isset($data[0]) && $data[0] != '' ? $data[0] : 0 );
      $data[1] = ( isset($data[1]) && $data[1] != '' ? $data[1] : 0 );
      $data[2] = ( isset($data[2]) && $data[2] != '' ? $data[2] : 0 );
      $this->add_value( $row_name, round($data[0]) );
      $this->add_value( $row_name . '_c', round( $data[0]+$data[1]+$data[2] ) );
      $this->add_value( $row_name . '_b', round( $data[1] ) );
      $this->add_value( $row_name . '_d', round( $data[2] ) );
   }



Find
Code: Select all
            $this->add_rating( 'melee_power', $attack['AttackPower']);
            $this->add_rating( 'melee_hit', $attack['HitRating']);
            $this->add_rating( 'melee_crit', $attack['CritRating']);
            $this->add_rating( 'melee_haste', $attack['HasteRating']);


Replace with
Code: Select all
            if( isset( $attack['AttackPower'] ) )
            {
               $this->add_rating( 'melee_power', $attack['AttackPower']);
            }
            if( isset( $attack['HitRating'] ) )
            {
               $this->add_rating( 'melee_hit', $attack['HitRating']);
            }
            if( isset( $attack['CritRating'] ) )
            {
               $this->add_rating( 'melee_crit', $attack['CritRating']);
            }
            if( isset( $attack['HasteRating'] ) )
            {
               $this->add_rating( 'melee_haste', $attack['HasteRating']);
            }
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

SVN[1422]Update error - Member Pet Update

Postby mdeshane » Fri Nov 02, 2007 1:06 am

Worked like a charm!

Now it only kicks out 1 error.

PHP Errors:
lib\update.lib.php
Notice line 572: Undefined variable: char_name
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

SVN[1422]Update error - Member Pet Update

Postby zanix » Fri Nov 02, 2007 1:47 am

$char_name should be $guild_name

Replace
Code: Select all
$output .= '<span class="red">' . sprintf($roster->locale->act['not_updating'],'GuildProfiler',$char_name,$guild['GPversion']) . "</span><br />\n";


With
Code: Select all
$output .= '<span class="red">' . sprintf($roster->locale->act['not_updating'],'GuildProfiler',$guild_name,$guild['GPversion']) . "</span><br />\n";
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

SVN[1422]Update error - Member Pet Update

Postby mdeshane » Fri Nov 02, 2007 3:23 am

That fixed it! No more errors reported.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US


Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest

cron