38 lines
843 B
Markdown
38 lines
843 B
Markdown
# MercanElArosWorldFade.js — scheduleLoop() (satır 463)
|
||
|
||
[← MercanElArosWorldFade.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function scheduleLoop(c, runId)
|
||
{
|
||
c.scheduleScript(LOOP_INTERVAL, function (context)
|
||
{
|
||
var state = mappet.get(STATE_KEY);
|
||
|
||
if (state == null || !state.enabled || Number(state.runId) !== Number(runId))
|
||
{
|
||
return;
|
||
}
|
||
|
||
try
|
||
{
|
||
updateZone(context);
|
||
}
|
||
catch (e)
|
||
{
|
||
var subject = context.getSubject();
|
||
|
||
if (subject != null && subject.isPlayer())
|
||
{
|
||
subject.send("Grey zone hata: " + e);
|
||
}
|
||
|
||
stop(context);
|
||
return;
|
||
}
|
||
|
||
scheduleLoop(context, runId);
|
||
});
|
||
}
|
||
```
|