Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 360voice.com
 XML/APIs
 GamerScore coming in as text

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Insert Smilie
   
Message:

* HTML is OFF
* Forum Code is ON

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Fafhrdd Posted - May 15 2008 : 12:57:45 PM
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?
2   L A T E S T    R E P L I E S    (Newest First)
Fafhrdd Posted - May 15 2008 : 1:04:02 PM
It worked perfectly! Thanks!
squidpunch Posted - May 15 2008 : 1:02:52 PM
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

360voice Community © 2006 360voice.com Go To Top Of Page
Snitz Forums 2000