lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>> John Klimek <jklimek@gmail.com> (08.12.2005 20:39:00) 
> var 
>   TestObj : ^TTestObj; 
> begin 
>   TestObj := lua_newuserdata(luaVM, sizeOf(TTestObj)); 
>   TestObj^.property := 500; // <--- this causes an exception 
> end;  

  You need to create your TTestObj.  
  Add somethig like this before exception line:

  TestObj^ := TTestObj.Create; // or TestObj^ := YourExistingObj;