Hi,
Simply trying to declare a global type and access it from a function, but it does'nt work (aka I musta messed something up). See the example below.
Thanks in advance,
For example:
TYPE _gb
gXSize AS Integer
gYSize AS Integer
gBlockSize AS Integer
ENDTYPE
----------------
global gb as _GB
gb.gXSize=10
gb.gYSize=17
gb.gBlockSize=10
*** This works correctly***
printat(0,0, str$(gb.gXSize)+"--------"+str$(
gb.gYSize))
do
draw()
loop
function draw()
set current bitmap 0
copy bitmap 100, 0
rect(0,0,639,479)
x1=
gb.gXSize
*** Does'nt work, comes up as 0 when it should be 10 as assigned in the beginning ***
printat(0,0, str$(x1)
*** it wont accept str$(gb.gXSize) as the parameter either ***
sync
endfunction