void main()
{
object oDoor = GetObjectByTag("MyDoor");
SetLocked(oDoor, FALSE);
AssignCommand(oDoor, ActionOpenDoor(oDoor));
}
Modifié par Squatting Monk, 03 février 2014 - 02:04 .
Cursed Eclipse wrote...
nr.#2
I tried to run my pw from my PC,i noticed that when the server has no players in it ,there is an infinite increase of the usage of RAM.
How i can fix this?
That bug has nothing to do with my script or the OS where you're hosting the module.MerricksDad wrote...
Cursed Eclipse wrote...
nr.#2
I tried to run my pw from my PC,i noticed that when the server has no players in it ,there is an infinite increase of the usage of RAM.
How i can fix this?
search your custom scripts for any loop that creates objects, including objects not actually seen in the game. Check also for any looping pattern that might accidentally be storing a local or pw variable incrementally instead of incrementing its value. without seeing any of your code, no clues beyond that.
If you are on win7, I know there are some programs that let you peek into what processes are resident inside your executable. Look for something like that online and it might show you a leaky 3d model, or a process tree that is expanding in size.
Modifié par Cursed Eclipse, 04 février 2014 - 11:09 .
You'd use SignalEvent(), probably to call an OnUserDefined event. For example, you could create a userdefined event that tells that door to open:Cursed Eclipse wrote...
@Thanks S.Monk
could you provide me an example with signal event?
// OnExhausted
void main()
{
object oDoor = GetObjectByTag("my_door");
SignalEvent(oDoor, EventUserDefined(20000));
}
// OnUserDefined for the door
void main()
{
int nEvent = GetUserDefinedEventNumber();
if (nEvent == 20000)
{
SetLocked(OBJECT_SELF, FALSE);
ActionOpenDoor(OBJECT_SELF);
}
}
Modifié par Squatting Monk, 05 février 2014 - 01:28 .