The return value from the make vector/matrix functions was meant to flag success. The variable itself is useless since failure will cause an error. The variable is only required by the make functions for syntax. I have written a vector exist function a while back. Here’s the code.
remstart
Vector Types
------------
Vector2 = 1
Vector3 = 2
Vector4 = 3
Matrix4 = 4
remend
global VectorDLL = 1
` you will need at least one 3DMath Command in you program or this will fail.
load dll "DBProVectorsDebug.dll", VectorDLL
null = make vector2(1)
` if vector exist and is type 1
if VectorExist(1, 1)
print "Vector Exist."
else
print "Vector Does Not Exist."
endif
wait key
end
function VectorExist(VecID as integer, VecType as integer)
Result as boolean
Result = 0
if (call dll(VectorDLL, "?GetExist@@YAHH@Z", VecID))
Result = call dll(VectorDLL, "?CheckTypeIsValid@@YA_NHH@Z", VecID, VecType)
endif
endfunction Result