Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
not work with npc
when say "hi"
21:37 Eventer: Hello Admin Andrewss. If you want to join the Battle just tell me.
when say "battle" nothing
please help
function getBlue()
return db.getResult("SELECT `blue` FROM `Teams` WHERE `id`='" .. 1):getDataInt("blue")
end
function getRed()
return db.getResult("SELECT `red` FROM `Teams` WHERE `id`='" .. 1):getDataInt("red")
end
function removeRed()
return db.executeQuery("UPDATE `Teams` SET `red` = `red` - " .. 1 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end
function removeBlue()
return db.executeQuery("UPDATE `Teams` SET `blue` = `blue` - " .. 1 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end
function resetBlue()
return db.executeQuery("UPDATE `Teams` SET `blue` = " .. 0 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end
function resetRed()
return db.executeQuery("UPDATE `Teams` SET `red` = " .. 0 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end
Why didn't u add checks and why you haven't results freeying (Dunno if I spelled it correct), ye ye keep codes with memory leaks... =\
Correct one:
Code:
function something()
local res = db.getResult("SELECT `field` FROM `table`;")
local value = 0
if(res:getID() ~= -1) then
value = res:getDataInt("field")
res:free()
end
return value
end
When 2 chars enter arena and they fight, one of them is at black hp, instead of teleport and giving rewards to winning team nothing happens and in console this thing appears (picture in attachement). Help please. I haz TFS 0.3.6 on tibia 8.54.