dim MyValue(1)
MyValue(1)=10
Hello()
wait key
function Hello()
if MyValue(1)=10
print "Ohhh its 10"
else
print "Damn... something ain't right"
endfuntion
that will work
MakeArray(10)
Hello()
wait key
function Hello()
if MyValue(1)=10
print "Ohhh its 10"
else
print "Damn... something ain't right"
endfuntion
function MakeArray( value )
dim MyValue(1)
MyValue(1)=value
endfunction
that won't... but we change this
MakeArray(10)
Hello()
wait key
function Hello()
if MyValue(1)=10
print "Ohhh its 10"
else
print "Damn... something ain't right"
endfuntion
function MakeArray( value )
global dim MyValue(1)
MyValue(1)=value
endfunction
and it will again

... its all about understanding how each of the differen variables interact - generally though you should declare values you create as variable types (boolean|byte|word|dword|float|etc...) and also no matter what your doing you should also try to declare it as global or local else it will take it as a standard value operation life ... which is good as it allows you to redeclare these values within functions, but it is also bad as it doesn't globally make sure these values are always declared.
Functions within DBP have been changed to be self contained as opposed to DBv1 where they were globally marked.
This means even though it is possible to have values globally created within the main program, it doesn't guarentee 100% success you can pass them into functions unless you mark them with either
Global or
Local ... sides it is always good habit to get into declaring everything you use.
Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!