Simplified example:
Scriptname MyPrivateType extends ObjectReferenceMyPrivateType Property NextItem AutoMyPrivateType Property PrevItem AutoGlobalVariableScript Property Gvar Auto ; Variables and Global reference used to store the items is here.MyPrivateType Function NewItem() MyPrivateType ItemHere If Gvar.ItemList ItemHere = Gvar.ItemList.PlaceAtme(Gvar.PrivateTypeForm,1) ItemHere.NextItem = Gvar.ItemList Gvar.ItemList.PrevItem = ItemHere Endif Gvar.ItemList = ItemHere return ItemHereendFunction
All the other script needs to have is:
MyPrivateType LocalNameLocalName = LocalName.NewItem(); Do stuff to NewItem - making one is handled internally
Why can't you call the NewItem() function from the variable and get an item? Even if NewItem's value is "none" it is still a variable of type MyPrivateType. I don't get a compiler complaint, it should be calling the function, but it isn't. It seems incredibly dumb if you have to create a new item, outside the item script, just so you can call the function to create a new item, and then delete the one you created just to call the function that one time.
