// i complicated this as much as i could //
// hope that will help :P //
function example takes real r returns integer // this entire function does what most bj functions do(nothing) //
return R2I(r) // this line converts given real into integer. it could be standing alone but where's the fun in that? //
endfunction
function example_init takes unit u, player p returns nothing
local real x = GetUnitX(u) // we define real coordinates here //
local real y = GetUnitY(u)
local integer inx = example(x) // here we pass our real coordinates to example which returns integers //
local integer iny = example(y)
call CreateTextTagUnitBJ(I2S(inx), u, 100, 50, 255, 0, 0, 20) // we write the integer coordnates on their true location in the map //
call CreateTextTagUnitBJ(I2S(iny), u, 50, 50, 255, 0, 0, 20)
endfunction