Variant and ScriptObject

Im trying to test Variant and new ScriptObject support, but this code produces an error of No matching siganture for Variant(Test&):

class Test : ScriptObject
 void CallScript()
  Variant t = Variant(this);

What Im doing wrong here?

Just what sinoid said, requires a handle.

Then the error says this: Scripts/RPG/,19 No matching signatures to ‘Variant(Entity@&)’

Angelscrips this passes a reference to a handle which isn’t compatible with the function signiture, you’d have to do something like:

MyObj@ obj = @this;
Variant["bla"] = obj;

At the moment.

Entity@ obj = @this; Variant["me"] = obj;

[Mon Jan 5 07:13:46 2015] ERROR: Scripts/RPG/,12 Expected ']' [Mon Jan 5 07:13:46 2015] ERROR: Scripts/RPG/,12 Instead found '<string constant>'

But Variant t = Variant(obj); works