Eu dei uma olhada no meu OT, e no seu erro: Tem duas barras depois de Data, talvez seja isso.
Substitua pelo meu arquivo.
Vá na pasta Data/Lib/255-otal.lua e substitua o que tem dentro por isso - talvez os créditos fiquem em #
--[[Open Tibia Advanced Lib (Otal)
Made by: Mock
Tested in: TFS 0.3.(5,4,3,2,1)
Tested in: Open tibia SVN
All this functions was made by:
Mock, skyen hasus, nord, magus, dark billie,
colandus and shawak. And libs like luasocket
etc was made by other group of peoples.
Please report bugs on: http://otal.awardspace.info/
Contact: mock_#####@hotmail.com
]]
--- Open config and set config vars at global vars.
dofile("config.lua")
---- Lib info table, please do not change it.
_LIBINFO = {
_VERSION = "1.3",
_NAME = "Open Tibia Advanced Lib (OTAL)",
_AUTHOR = "Mock",
_UPDATECHECK = "http://otal.awardspace.info/",
['mysql'] = {
vip="ALTER TABLE `accounts` ADD `vip_time` INT(15) NOT NULL",
storage="CREATE TABLE IF NOT EXISTS "..(type(sqlDatabase) ~= 'string' and '`'..sqlDatabase..'`.' or "").."`account_storage` (`id` INT( 11 ) NOT NULL ,`value` VARCHAR( 10 ) NOT NULL ,INDEX ( `id` ))",
},
['sqlite'] = {
vip = "ALTER TABLE `accounts` ADD `vip_time` INTEGER",
storage="CREATE TABLE IF NOT EXISTS `account_storage` (id INTEGER, value VARCHAR )",
},
}
--- Open constants and config
dofile(getDataDir() .. 'lib/otal/otal_config.lua')
--- check if this lib is already loaded
function lin()
if _LIBINFO.LOADED == nil then
io.write(" Starting V".._LIBINFO._VERSION)
io.write(' Loading libs.')
--- Open all lua files
for i,b in pairs(_LIBINFO._LUAFILES) do
dofile(getDataDir() .. 'lib/otal/'..b)
io.write('.')
end
--- Set path dir
package.path = package.path..";"..getDataDir().."/lib/otal/lua/?.lua"
package.cpath = package.cpath..";"..getDataDir().."/lib/otal/?.dll"
--- Open all libs
for i,b in pairs(_LIBINFO._LIBS) do
require(b)
io.write('.')
end
io.write('.')
--- Check if is nescessary instal lib.
local f_ = io.open('OTAL-REINSTALL','r')
if f_ then
f_:close()
f_ = nil
--- Check for updates
dofile('OTAL-REINSTALL')
--- Check if version is updated
if tonumber(ver___) < tonumber(_LIBINFO._VERSION) then
--- Delete old otal reinstall
os.remove('OTAL-REINSTALL')
--- Star new instalattion
install()
end
else
io.write('.[Done]\n')
--- Start install.
printT("::Installing.",1)
--- Run function to install
install()
end
--- Checking sql
if os.dir('data/sql') then
for i in os.dir('data/sql') do
if i.name:find('(.+)%.sql') or i.name:find('(.+)%.sqlite') or i.name:find('(.+)%.mysql') then
io.write('..[Opening: '..i.name..'].')
local file = io.open('data/sql/'..i.name,'r')
if file then
local str = file:read(-1)
io.write('...')
if sqlType == "mysql" then
env = assert(luasql.mysql())
con = assert(env:connect(sql_db or sqlDatabase, sql_user or sqlUser, sql_pass or sqlPass, sql_host or sqlHost, sql_port or sqlPort))
elseif sqlType == 'sqlite' then
env = assert(luasql.sqlite3())
con = assert(env:connect(sql_db or sqliteDatabase or sqlFile))
else
error('You cant execute OTAL on XML mode.')
os.sleep(3)
os.exit()
end
local _1,err = con:execute(str)
con:close()
env:close()
file:close()
if err and not _1 then
io.write('.ERROR!..'..err..'..\n')
else
io.write('..SQL.done.')
end
os.remove('data/sql/'..i.name)
else
io.write('.ERROR!.')
end
end
end
else
io.write('.Error no such dir data/sql \n')
end
if os.dir('data/install') then
for i in os.dir('data/install') do
if i.name:find('(.+)%.luai') then
io.write('. -- Installing '..i.name..'.\n')
print(install_lua(i.name))
io.write('Back to load...')
os.remove('data/install/'..i.name)
end
end
else
io.write('.Error no such dir data/install \n')
end
--- Finishing
io.write('.[done]\n')
_LIBINFO.LOADED = true
end
end
function install()
local time = os.clock()
io.write('Please wait.')
io.write('.')
--- Instal dirs
for i,b in pairs({'storage','sql','install'}) do
local ff__ = io.open('data\\'..b..'\\info.lua','r')
if ff__ == nil then
os.execute("md data\\"..b)
io.open('data\\'..b..'\\info.lua','w'):close()
io.write('.')
else
ff__:close()
io.write('.')
end
end
io.write('.')
if _LIBINFO[sqlType] == nil then
io.write('Please wait. FATAL ERROR! sqlType='..sqlType..' can be only: \'sqlite\' or \'mysql\'!')
os.sleep(10)
os.exit()
end
--- Install tables
if sqlType == "mysql" then
env = assert(luasql.mysql())
con = assert(env:connect(sql_db or sqlDatabase, sql_user or sqlUser, sql_pass or sqlPass, sql_host or sqlHost, sql_port or sqlPort))
elseif sqlType == 'sqlite' then
env = assert(luasql.sqlite3())
con = assert(env:connect(sql_db or sqliteDatabase or sqlFile))
else
error('You cant execute OTAL on XML mode.')
os.sleep(3)
os.exit()
end
cur = con:execute(_LIBINFO[sqlType].vip)
io.write('.')
if(type(cur) ~= 'number') and cur ~= nil then
cur:close()
end
cur = con:execute(_LIBINFO[sqlType].storage)
io.write('.')
if(type(cur) ~= 'number') and cur ~= nil then
cur:close()
end
con:close()
env:close()
io.write('.')
local file_ = io.open('OTAL-REINSTALL','w')
file_:write("ver___='".._LIBINFO._VERSION.."'\n da___='"..os.date("%d").."'")
file_:close()
file_ = nil
io.write('.[done]\n')
local k,j = getLuaFunctions()
--- Create file content your server function list
local file__ = io.open('Your Server Function List.txt','w')
table.sort(k)
for i=1,#k do
if k ~= "" then
file__:write((i-1)..' - '..k..'\n')
end
end
file__:close()
file__ = nil
print("> Your server has "..(#k-1).." lua functions.")
print('>>> Finished in '..(os.clock()-time)..' seconds.')
end
function install_lua(name)
print('\n Starting\a install of:'..name)
local f = io.open('data/install/'..name,'r')
if f then
f:close()
dofile('data/install/'..name)
if instal_f then
local f = io.open('data/'..instal_f['module']..'/'..instal_f['module']..'.xml','r')
if f then
local str = f:read(-1)
f:close()
local ae = string.match(str,"<"..instal_f['module']..">(.+)")
if ae then
file = [[<?xml version="1.0"?>
<]]..instal_f['module']..[[>
]]..instal_f['tag']..'\n'..ae
local f = io.open('data/'..instal_f['module']..'/'..instal_f['module']..'.xml','w')
if f then
f:write(file)
f:close()
local f = io.open('data/'..instal_f['module']..'/scripts/'..instal_f['name'],'w')
if not f then
return ('Cannot create folder')
end
f:write(instal_f['script'])
f:close()
if (instal_f[sqlType] ~= '' and instal_f[sqlType]) then
if sqlType == "mysql" then
env = assert(luasql.mysql())
con = assert(env:connect(sql_db or sqlDatabase, sql_user or sqlUser, sql_pass or sqlPass, sql_host or sqlHost, sql_port or sqlPort))
cur,err = con:execute(instal_f['sqlite'])
if not cur and err then
return ('Err: '..tostring(err)..'')
end
con:close()
env:close()
elseif sqlType == 'sqlite' then
env = assert(luasql.sqlite3())
con = assert(env:connect(sql_db or sqliteDatabase or sqlFile))
cur,err = con:execute(instal_f['sqlite'])
if not cur and err then
return ('Err: '..tostring(err)..'')
end
con:close()
env:close()
else
error('You cant execute SQL QUERYS on XML mode.')
return ('sql error!')
end end
print('\a INFO:')
print(string.rep('=',25))
print(instal_f['info'])
print(string.rep('=',25))
return ('Instalattion finished!\a')
else
return ('Cannot open data/'..instal_f['module']..'/'..instal_f['module']..'.xml file is locked.')
end
else
return ('Bad xml format')
end
else
return ('Cannot open data/'..instal_f['module']..'/'..instal_f['module']..'.xml UNKNOW MODULE.')
end
end
else
return ('Cannot open '..name..'.')
end
end
lin()
Qualquer dúvida pergunte, depois eu dou uma olhada aqui.
EDIT:
Também pode ser o erro na DLL, baixe a minha clicando aqui, vá na pasta Data/Lib/Otal, cole o arquivo.dll lá (substitua o antigo)




info
Grupo: Campones
Registrado: 21/08/10
Posts: 24
Reputação: +1
sempre que eu ligo meu ot de Pokemon (8.54) ele fica dando esse erro, eu testei e fica em todos os ots de pokemons ;x
algêm me ajuda !
erro:
[Error - GlobalEvent Interface]
data/lib/255-otal.lua
Description:
error loading module 'ex' from file 'data//lib/otal/ex.dll':