Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 360voice.com
 XML/APIs
 GamerScore coming in as text
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Fafhrdd

127,343

Zone: Recreation

Total games played: 263

Current Streak: 1

Longest Streak: 60

Comments Made: 1,337

Moderator

USA
1081 Posts

Posted - May 15 2008 :  12:57:45 PM  Show Profile  Visit Fafhrdd's Homepage  Reply with Quote
I am grabbing some data from the Challenge Detail XML feed. I grab the Totalgain and place it directly into my multidementional array.

When I try to add it up, since it is text, it just combines the numbers (for example 1040 + 1000 = 10401000 and not 2040).

Is there an easy way to define that piece of data as an integer (keep in mind the rest of my data in the MD array is text).

Or should I just not try to directly take the XML data and place it into the array. Should I define a temp integer to grab the XML feed and then place it into my array?

What would be the best way?


Right now I am using this to grab the feed:

set challengesSCORE = sourceID.getElementsByTagName("totalgain")

allData(0,totalusercount) = challengesSCORE.item(x-1).text


I realize that I am using .text... Is there a different postfix to use?


360 Tune Up | Xbox 360 Tech Blog | Bing: Search and Earn Microsoft Points

Latest Tool Released: Achievement Rating System (ARS)

Lastest Blog Posting: Project Find More Room

Lastest How-To Guide: How to Open an Xbox 360 Controller

My points BEFORE 360V challenges: 14,590

Edited by - Fafhrdd on May 15 2008 1:03:13 PM

squidpunch

72,192

Zone: Recreation

Total games played: 344

Current Streak: 9

Longest Streak: 109

Comments Made: 1,337

360voice Staff

USA
1509 Posts

Posted - May 15 2008 :  1:02:52 PM  Show Profile  Visit squidpunch's Homepage  Reply with Quote
classic asp right?

assuming its an integer range, you should be able to use.

CINT(value)

from what i recall everything in vbscript / classic asp is datatyped as variant - and is probably assuming a text value because its read from an xml string - in any event i think that should get it to function as a number for you


*no squids were harmed in the creation or use of this gamertag
Check out the latest Friendcast! | 360friendspot.com | Squidpunch.com | larrabeefamily.com | madden-stats.com
Go to Top of Page

Fafhrdd

127,343

Zone: Recreation

Total games played: 263

Current Streak: 1

Longest Streak: 60

Comments Made: 1,337

Moderator

USA
1081 Posts

Posted - May 15 2008 :  1:04:02 PM  Show Profile  Visit Fafhrdd's Homepage  Reply with Quote
It worked perfectly! Thanks!


360 Tune Up | Xbox 360 Tech Blog | Bing: Search and Earn Microsoft Points

Latest Tool Released: Achievement Rating System (ARS)

Lastest Blog Posting: Project Find More Room

Lastest How-To Guide: How to Open an Xbox 360 Controller

My points BEFORE 360V challenges: 14,590

Edited by - Fafhrdd on May 15 2008 5:36:05 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
360voice Community © 2006 360voice.com Go To Top Of Page
Snitz Forums 2000