type and code

Blitz3D Forums/Blitz3D Programming/type and code

You can't compile code at runtime, unless you use the virtual machine. However I'm not sure if you need this.
You can pass the instance of a type as a parameter:
type Enemy
field x#
field y#
end type

function HandleMovement(e.Enemy)
if e\x < 0 then e\x = 0
end function

If you need any parameters, you can store them in the type.