I'd like to free the slot of a provider if some condition is met, someone can help me? This is my try:
Code: Select all
if this.Slot0.i > -1 then
thePrisoner = getObject("Prisoner",this.Slot0.i)
if <...somecondition ...> then
<...do something ... >
else
thePrisoner.Loaded = false
thePrisoner.ClearRouting()
this.Slot0.i = -1
this.Slot0.u = -1
end
end
This way the prisoner effectively free the slot, but because his need is high, he suddenly find the free slot again and occupies it again. Any idea?