Parsing Error

Sync Blizzards' Armory data with WoWRoster (addon depreciated no longer works see ApiSync)

Moderators: Ulminia, poetter

Parsing Error

Postby Dakira » Tue Sep 11, 2007 11:42 am

My ArmorySynch stopped working a couple of weeks ago and I've been followingt he forums trying to get it back up and running to no avail.

The guild (Leviathan) is on the US server Ravenholdt... we have 52 members and trouble updating all of them.

I reinstalled the lastest version of ArmorySynch and made the suggested changes to the config file (i.e. changed Synching address to www.wowarmory.com).

I'm now getting an error as follows:-

SELECT members.name , ISNULL(players.name) AS playerExists , STR_TO_DATE(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') AS playerLastUpdated FROM `roster_members` members LEFT JOIN `roster_players` players ON members.name = players.name WHERE members.level >= 60 AND ( ISNULL(players.name) OR STR_TO_DATE(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') <= DATE_SUB(NOW(), INTERVAL 24 HOUR) OR STR_TO_DATE(players.dateupdatedutc,'%m/%d/%y %H:%i:%s') >= DATE_ADD(NOW(), INTERVAL 1 YEAR) ) ORDER BY members.update_time DESC
Spongwo 0 2007-09-04 00:00:00
Yozi 0 2007-09-01 00:00:00
Sawgrin 0 2007-09-09 00:00:00
Slammy 0 2007-09-05 00:00:00
Aimster 0 2007-09-07 00:00:00
Found 5 players.
GetContentCurl: www.wowarmory.com/character-sheet.xml?r ... &n=Spongwo, 1, User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2, cookieLangId=en_us;

Warning: Invalid argument supplied for foreach() in /home/dexineor/public_html/leviathan/roster/addons/ArmorySynch/functions.parsing.php on line 118

Warning: Invalid argument supplied for foreach() in /home/dexineor/public_html/leviathan/roster/addons/ArmorySynch/functions.parsing.php on line 139
GetContentCurl: www.wowarmory.com/item-tooltip.xml?i=16 ... &n=Spongwo, 1, User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2, cookieLangId=en_us;


I've checked that my functions.parsing.php file is okay (replaced it with the original twice) but still having no luck.

If anyone has any ideas or fixes for this problem it would be very much appreciated.

Thanks in advance...

Peter (Dakira)
Dakira
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Tue Sep 11, 2007 11:34 am

Parsing Error

Postby Dakira » Tue Sep 11, 2007 11:47 am

Oh.. Just in case it helps..

The following is my config file..

Code: Select all
<?php

if (!defined('ROSTER_INSTALLED')) {
   exit('Detected invalid access to this file!');
}

//Configuration
$addon_conf['ArmorySync']['Host'] = "www.wowarmory.com"; //European players use: armory.wow-europe.com
$addon_conf['ArmorySync']['MinLevel'] = 60; //The minimum level to be updated
$addon_conf['ArmorySync']['SynchCutoffTime'] = 24; //Time, in hours.  All players who have not updated in the last (24) hours will be updated.
$addon_conf['ArmorySync']['UseCurl'] = true; //Set this to false if you want to use the original FileSocket function.
$addon_conf['ArmorySync']['DebugLevel'] = 2; //0 = no debug messages, 1 = some debug messages, 2 = verbose debug messages
$addon_conf['ArmorySync']['UpdateRoster'] = true; //Wether or not to update Roster.  Useful if you're just debugging.
$addon_conf['ArmorySync']['Locale'] = $roster_conf['roster_lang']; //The language used, but default it is the language that roster is configured to.
$addon_conf['ArmorySync']['ArmoryLocale'] = strtolower(substr($addon_conf['ArmorySync']['Locale'], 0, 2)) . "_" . strtolower(substr($addon_conf['ArmorySync']['Locale'], 2, 2)); //The Locale that armory is expecting, in the format of lowercase_lowercase (ie en_us or de_de).
$addon_conf['ArmorySync']['MemberSorting'] = "members.update_time DESC"; //alternatives are "members.update_time DESC" to use the last time the member was updated
$addon_conf['ArmorySync']['ServerMonth'] = array("January","February","March","April","May","June","July","August","September","October","November","December"); //just a list of the month names for the server.  Change this to whatever language necessary.
$addon_conf['ArmorySync']['DateUpdatedFormat'] = "%m/%d/%y %H:%i:%s"; //Europeans change this to "%d/%m/%y %H:%i:%s"
$addon_conf['ArmorySync']['Timeout'] = 200; //This is the maximum number of seconds we will try to get stuff from the armory.
?>


and here is a section of the fuctions.parsing.php that seems to be the problem.

Code: Select all
function parseSkills($skillSets, &$skills) {
   foreach ($skillSets as $order => $skillSet) {
      $type = $skillSet->name;
      $skills[$type] = array();
      
      if (is_array($skillSet->skill)) {
         foreach($skillSet->skill as $skill) {
            setSkill($skill, $skills[$type]);
         }
      } else {
         setSkill($skillSet->skill, $skills[$type]);
      }
      
      $skills[$type]["Order"] = getSkillOrder($type);
   }
}

function setSkill($skill, &$output) {
   $output[$skill->name] = $skill->value . ":" . (($skill->max > 0) ? $skill->max : 1);
}

function parseReputation($factionReputation, &$reputation) {
   foreach ($factionReputation as $factionRep) {
      $factionType = $factionRep->name;
      
      if (is_array($factionRep->faction)) {
         foreach($factionRep->faction as $faction) {
            setFaction($faction, $reputation[$factionType]);
         }
      } else {
         setFaction($factionRep->faction, $reputation[$factionType]);
      }
   }
}
Dakira
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Tue Sep 11, 2007 11:34 am

Parsing Error

Postby danbk » Thu Sep 13, 2007 12:39 am

Dakira ... I'm assuming you're talking about the errors at line 125 and 146 i think it was? I don't remember exactly.

I had the same problem and there was an update to the code. Make sure you get the latest updates from this post:

Fixes for Version 253
Last edited by danbk on Thu Sep 13, 2007 12:40 am, edited 1 time in total.
danbk
WR.net Apprentice
WR.net Apprentice
 
Posts: 14
Joined: Tue Jul 04, 2006 6:09 pm

Re: Parsing Error

Postby Yelm » Fri Sep 28, 2007 4:00 pm

I have the same error, even with all fixes 253 installed.

Warning: Invalid argument supplied for foreach() in /home.10.13/aoeguild/www/roster/addons/ArmorySynch/functions.parsing.php on line 118

Warning: Invalid argument supplied for foreach() in /home.10.13/aoeguild/www/roster/addons/ArmorySynch/functions.parsing.php on line 139

And for information, this is the part of incriminated code:

Line 118 (first foreach)

Code: Select all
function parseSkills($skillSets, &$skills) {
   foreach ($skillSets as $order => $skillSet) {
      $type = $skillSet->name;
      $skills[$type] = array();
      
      if (is_array($skillSet->skill)) {
         foreach($skillSet->skill as $skill) {
            setSkill($skill, $skills[$type]);
         }
      } else {
         setSkill($skillSet->skill, $skills[$type]);
      }
      
      $skills[$type]["Order"] = getSkillOrder($type);
   }
}


Line 139 (first foreach)

Code: Select all
function parseReputation($factionReputation, &$reputation) {
   foreach ($factionReputation as $factionRep) {
      $factionType = $factionRep->name;
      
      if (is_array($factionRep->faction)) {
         foreach($factionRep->faction as $faction) {
            setFaction($faction, $reputation[$factionType]);
         }
      } else {
         setFaction($factionRep->faction, $reputation[$factionType]);
      }
   }
}


Does someone has a solution? ;)
User avatar
Yelm
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Sep 28, 2007 3:55 pm
Location: Geneva, Switzerland

Parsing Error

Postby poetter » Fri Sep 28, 2007 7:46 pm

Are you sure you are using ArmorySync 253 fixes_4 ?
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg


Return to ArmorySync - Depreciated

Who is online

Users browsing this forum: No registered users and 1 guest

cron