it's me ... again

i run into a new problem that i couldn't fix for myself. i want to register a struct to the ASengine and use that struct within scripts as parameter. i'm not quite sure if i did it correctly.
another problem is, that i get the following error:
System function (Row:1, Col:23) : ERR : Object handle is not supported for this type
when trying to use a ref registered object as parameter in a scriptfile.
here is the scriptfile:
http://codepad.org/vb5ltPRX
can i use EventData@ as parameter to be able to manipulate the data within the object so the data gets manipulated in the c++ application as well? (call by reference).
here is how i register the objects so far:
http://codepad.org/UC8Qp8rb
what i am trying to do:
i have an observerclass that observes units in my game if the cast,attack,move,... when an event happens the EventData object will be created and the onEvent of abilities will be called to f.e. return damage to the attacker if the attacked unit has the thorn ability.
regards simon
edit: nvm guys, i could fix it myself. i was a little bit confused about the @ operator and the reference/handle thing in angelscript but i think i managed it now and understand it.
@ == * in c++ with additional features for angelscript when registering functions (f.e. @+ operator for registering)
& doesn't exist, instead you have to use &in,&out or &inout or you use the as_UNSAFE_WHATEVER config which is not recommended.