• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Help solve these errors

Crip Killa

♪Chasm Dev♪
Joined
Oct 19, 2008
Messages
515
Reaction score
44
Can anyone help me solve these errors I get when I start up my ot and if so give me the steps to solve these errors as always I will REP+++ and I will be very grateful

[08/06/2012 21:11:41] [Error - CreatureScript Interface]
[08/06/2012 21:11:41] data/creaturescripts/scripts/kill.lua
[08/06/2012 21:11:41] Description:
[08/06/2012 21:11:41] cannot open ./GuildWar.lua: No such file or directory
[08/06/2012 21:11:41] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/kill.lua)

[08/06/2012 21:11:42] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/events.lua:5: '}' expected (to close '{' at line 3) near '['
[08/06/2012 21:11:42] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/events.lua)
[08/06/2012 21:11:42] data/creaturescripts/scripts/events.lua:5: '}' expected (to close '{' at line 3) near '['

bump
 
This is the Kill.lua

Code:
dofile("./GuildWar.lua")
local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('pzLocked'))
function onKill(cid, target)
	if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
		local myGuild = getPlayerGuildId(cid)
		local enemyGuild = getPlayerGuildId(target)
		if myGuild ~= 0 and enemyGuild ~= 0 then
			if enemyGuild == getGuildWarInfo(myGuild).With then
				removeFrag(cid)
				doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This Frag will not count") --Remove this if you wish
				doAddCondition(cid, PZ)
				registerDeath(myGuild, enemyGuild, cid, target)
			end
		end
        end
	return TRUE
end

Here is events.lua

Code:
            --Script By Unass--
local skills = 
{
    [1] = {points = 50, storage = 30701, value = 2, text = "level", level = 100}
    [2] = {points = 75, storage = 30702, value = 2, text = "level", level = 150}
    [3] = {points = 100, storage = 30703, value = 2, text = "level", level = 200}
    [4] = {points = 150, storage = 30704, value = 2, text = "level", level = 250}			  
	[5] = {points = 200, storage = 30705, value = 2, text = "level", level = 300}
}

function onAdvance(cid, skill, oldLevel, newLevel)
    local x = skills[skill]
    if getGlobalStorageValue(x.storage) < x.value and getPlayerStorageValue(cid, x.storage) ~= x.value and getPlayerSkillLevel(cid, skill) >= x.level and skills[skill] then
    doAddPoints(cid, x.points)
    setGlobalStorageValue(x.storage, x.value)
    setPlayerStorageValue(cid, x.storage, x.value)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Congratulations! You are reached ".. x.level .." ".. x.text .." and you have gained ".. x.points .." Premium Points!")
    end
    return true
end
 
dofile("./GuildWar.lua") <-----the path is wrong, point to the folder the lua is in too ( unless its a folder named "." then I have no clue lol)

my lua isnt too good, try adding comma after local lines 1 thru 4 is all I can think of on that second script
 
It's fix for this error
[08/06/2012 21:11:42] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/events.lua:5: '}' expected (to close '{' at line 3) near '['
[08/06/2012 21:11:42] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/events.lua)
[08/06/2012 21:11:42] data/creaturescripts/scripts/events.lua:5: '}' expected (to close '{' at line 3) near '['
LUA:
--Script By Unass--
local skills = 
{
    [1] = {points = 50, storage = 30701, value = 2, text = "level", level = 100},
    [2] = {points = 75, storage = 30702, value = 2, text = "level", level = 150},
    [3] = {points = 100, storage = 30703, value = 2, text = "level", level = 200},
    [4] = {points = 150, storage = 30704, value = 2, text = "level", level = 250},			  
	[5] = {points = 200, storage = 30705, value = 2, text = "level", level = 300}
}

function onAdvance(cid, skill, oldLevel, newLevel)
    local x = skills[skill]
    if getGlobalStorageValue(x.storage) < x.value and getPlayerStorageValue(cid, x.storage) ~= x.value and getPlayerSkillLevel(cid, skill) >= x.level and skills[skill] then
    doAddPoints(cid, x.points)
    setGlobalStorageValue(x.storage, x.value)
    setPlayerStorageValue(cid, x.storage, x.value)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Congratulations! You are reached ".. x.level .." ".. x.text .." and you have gained ".. x.points .." Premium Points!")
    end
    return true
end
 
Back
Top