Files

35 lines
681 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Darklord.js — loadState() (satır 101)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function loadState(c)
{
var raw = "";
try { raw = String(mappet.get(STATE_KEY) || ""); } catch (e1) {}
if (raw.length === 0)
{
try
{
var states = c.getServer().getStates();
raw = String(states.getString(STATE_KEY) || "");
}
catch (e2) {}
}
if (raw.length > 0)
{
try
{
var state = JSON.parse(raw);
return normalizeState(state);
}
catch (e3) {}
}
return defaultState();
}
```