There's something simple that I'm not understanding about data type conversions. Need a little help.
Trying to set the width and height of a text rectangle. Harcoding the numbers works, however, now I need to set the width and height from variables.
According to the docs (and testing) I have to first convert my variables to integer type. I tried appending a "%" to my variables but still get Data Type Conversion errors.
I get a value from my xml file...
rectWidth = xml.text_rectW.getText()
rectWidth is now 500
however, its still a string data type
how do I convert this to an integer so I can set my textbox rectangle width? Becuse this does not work...
rectWidth% = xml.text_rectW.getText()
rectHeight% = xml.text_rectH.getText()
mytext = []
mytext.Push({
Text: "some text to help make you boogie all night long with all the ladies"
TargetRect: { x:10, y:10, w: rectWidth%, h: rectHeight% }
})
the text displays fine but the text rectangle is the whole width and height of the screen.