I have created 3 arrays using 3 different types of syntax. The third one is your syntax, although you don't need to use
Global when you use
Dim. All 3 of them are working OK...
// Project: GlobalTypes
// Created: 2015-01-29
// set window properties
SetWindowTitle( "GlobalTypes" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
type tVector2
x as float
y as float
endtype
type tSprite
id
position as tVector2
endtype
dim arrSpriteDimmed[1] as tSprite
global arrSpriteGlobal as tSprite[1]
global dim arrSpriteMixed[1] as tSprite
arrSpriteDimmed[1].position.x = 1.1
arrSpriteGlobal[1].position.x = 1.1
arrSpriteMixed[1].position.x = 1.1
do
Print( ScreenFPS() )
printVals()
Sync()
loop
exit
function printVals()
print("Dimmed : " + str(arrSpriteDimmed[1].position.x))
print("Global : " + str(arrSpriteGlobal[1].position.x))
print("Dim Global : " + str(arrSpriteMixed[1].position.x))
endfunction
Quidquid latine dictum sit, altum sonatur