Ok, your dll use the standard calling convention.(Just checked your sourcecode)
Add "win32" to the end of your function declaration.
Like this...
Local func:Int (v1:Int, v2:Int) "win32"
that should take care of the problem.
I don't know which calling convention BMax uses by default but by adding "win32" you tell Bmax to use stdcall for this function.
Found this interesting article about calling conventions...
http://www.angelcode.com/dev/callconv/callconv.html
Add "win32" to the end of your function declaration.
Like this...
Local func:Int (v1:Int, v2:Int) "win32"
that should take care of the problem.
I don't know which calling convention BMax uses by default but by adding "win32" you tell Bmax to use stdcall for this function.
Found this interesting article about calling conventions...
http://www.angelcode.com/dev/callconv/callconv.html