originally posted in:BungieNetPlatform
To start I am using the manifest php code found here [url]http://bungienetplatform.wikia.com/wiki/Manifest[/url]
So, what I am doing is grabbing the json for saladin and trying to loop through the inventory found for the "Event Rewards". When I loop through the 8 entries found I query the getSingleDefinition('DestinyInventoryItemDefinition', $itemHash). Trouble is I get 5 of the 8 returning false. I have echoed out the 5 itemHash values that error out and looked them up in the inventory after extracting the JSON file and I can find the itemHash as output by my script?
So, for instance, my script calls getSingleDefinition('DestinyInventoryItemDefinition', 3367786034) and returns false, but looking it up manually by opening the extracted 16MB file [json_encode(getDefinition('DestinyInventoryItemDefinition'), JSON_PRETTY_PRINT)] I see that 3367786034 is the Goldspiral shadder.
Can anyone give me any insight into why I can't seem to get the data from the function call, but the data is found manually in the same table/file that the function is looking in?
-
Lq, I think the situation is that there's potentially a *lot* of places where this could be failing, and without you narrowing it down a bit it's hard for people to be of help. Do some debugging on it - add print statements if need be - to see where the point of failure is. Is it not making a connection to the database? Is it connecting but the query isn't returning results? Is the query string that you're creating ending up as valid a SQL command? Is it returning results but they're failing to deserialize? Because we're not a general development forum but rather specifically for BNet API questions, the questions above are a bit out of scope for us to answer here, which is why Bunk3r suggested StackOverflow (which is definitely more general purpose!). If you can, try to narrow down where the problem is through debugging, and in doing so if you run into a situation where you think the data is bad in the manifest database, post here with your results and what you tested to come to that conclusion - that'll help us help you!
-
Well, first of all i think this is a SO (StackOverflow) question, and i would actually go and post the script in SO and try to get some help. Second, if manually works and the script doesn't then that's a pretty good indication that the script is wrong.