I use this for my war scrit enforce and gives me an error this is scrit
And the error is this help my plis creaturescrit is an error when you try to enter a player
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Map Change" version="2.0" author="Syntax" contact="[email protected]" enabled="yes">
<description>
This should teleport all players to a new random town in intervals.
</description>
<config name="mapchange_config"><![CDATA[
config = {
access = 3, -- minimum access to bypass teleportation.
temples = {1,2,5,3}, -- townids to teleport to.
storage = 3454, -- number to store map status in.
changetime = 900 -- time to change in seconds (change in globalevents too)
}
]]></config>
<event type="login" name="Map Login" event="script"><![CDATA[
loadmodlib('mapchange_config')
function onLogin(cid)
doPlayerSetTown(cid, getGlobalStorageValue(config.storage))
doTeleportThing(cid, getPlayerMasterPos(cid))
return true
end
]]></event>
<globalevent name="Map Change" interval="900" event="script"><![CDATA[
domodlib('mapchange_config')
function onThink(interval, lastExecution, thinkInterval)
repeat
RDM = math.random(1,#config.temples)
until RDM ~= getGlobalStorageValue(config.storage) and isInArray(config.temples, RDM)
if getWorldCreatures(0) > 0 then
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerAccess(pid) < config.access and getPlayerAccountManager(pid) == MANAGER_NONE then
doPlayerSetTown(pid, config.temples[RDM])
doTeleportThing(pid, getTownTemplePosition(config.temples[RDM]), false)
doSendMagicEffect(getCreaturePosition(pid), 37)
doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
doCreatureAddMana(pid, getCreatureMaxMana(pid))
doRemoveConditions(pid, FALSE)
end
doBroadcastMessage("Round over. Map switched to " ..getTownName(config.temples[RDM]).. ".", MESSAGE_EVENT_ADVANCE)
setGlobalStorageValue(config.storage, config.temples[RDM])
end
else
print ("[MAP] No players online, aborting map change!")
end
return true
end
]]></globalevent>
</mod>
And the error is this help my plis creaturescrit is an error when you try to enter a player
[12/09/2010 07:52:44] [Error - CreatureScript Interface]
[12/09/2010 07:52:44] buffernLogin
[12/09/2010 07:52:44] Description:
[12/09/2010 07:52:44] [string "loadBuffer"]:3: attempt to index global 'config' (a nil value)
[12/09/2010 07:52:44] stack traceback:
[12/09/2010 07:52:44] [string "loadBuffer"]:3: in function <[string "loadBuffer"]:2>