Thread: LPC Help
View Single Post
Old 11-15-2002, 10:43 AM   #8
Loriel
Member
 
Join Date: May 2002
Posts: 49
Loriel is on a distinguished road
The problem is not with the array - it won't work because destruct is an efun, and its syntax is destruct(object), not object->destruct().

There may be a lfun in the lib (eg remove() in lima) which achieves a similar effect, and in that case you can use the syntax quoted - ie children(this_object())->remove().

But I don't think you need to go to all this trouble - just put whatever reset() function you want into your base room object, and it will be inherited into all these virtual rooms, which will take care of themselves.

To go back to the original question :
This depends on the mudlib, so you need to read the code for create() and reset() in the room, and also in any objects it inherits- but I don't really see how this relates to virtual rooms.

And yes, the Lima implementation (via /std/grid_server.c) works fine - you'll find a couple of examples of virtual rooms in the lib, one of which uses that and the other (a random maze) works directly via compile_object() in the master being used to call virtual_create() in the "master room".
Loriel is offline   Reply With Quote