hi, i'm loading a csv-file of xy-coordinates into a ListBox object to use a 'For each line' loop to spawn sprites at the specified positions. but ListBox.LineData() appears to return strings - or i suspect it to, because the results are always interpreted as 0 (zero) in the coordinate fields of the 'Create' action.
is there a counterpart to str(value) that can turn strings into values?
two things: [list:2ydtm257] [*:2ydtm257]when using ListBox.LineText() instead of ~.LineData(), it works even without enclosing int()[/*:m:2ydtm257] [*:2ydtm257]when using ~.LineData(), it does not work in any case[/*:m:2ydtm257][/list:u:2ydtm257]
off topic, but what is LineData supposed to return?
LineData only returns something if you set data for the line (using the Set Line Data action); this is useful for storing extra data on lines other than text. In this case you'll want to use LineText, which is automatically converted to an integer by the parser.
In all of Construct, passing a string to a number parameter automatically converts it, so you can pass either "500" or 500, it doesn't matter. As Rich pointed out, LineData does not give the text, LineText does