ID:159032
 



How would I get the value of each of these?

I've tried:
mob/verb
Get_Map_Width()
var/bla = winget(usr,"mainwindow.map","width")
usr << bla



But it doesn't give me a result.
Could this be the problem? xD

var/bla = winget(usr,"mainwindow.map","width")


Your map is "map1".
In response to Evi of au
var/bla = winget(usr,"mainwindow.map","size")

Doing that gets me the size in pixels, now it's just seperating them that's the problem.

I want to use one verb that will output the width only, and another that will output the height. in pixels.

Look in the first post to see what width and height I am talking about.
In response to Howey
You'll need to parse the returned text string (which is of the form "100x100")

   var/sizestr = winget(usr,"mapwindow.map","size")  // get map size as string 000x000
var/i = findtext(sizestr,"x") // find the x
var/width = text2num( copytext( sizestr, 1, i) ) // width is number before the x
var/height = text2num( copytext( sizestr, i+1) ) // height is number after the x