- Dołączył
- Listopad 1, 2008
- Posty
- 63
- Liczba reakcji
- 9
Witam.
No wiec tak: Mam pewien problem z naprawieniem bledow w silniku i sam mam trudnosci z naprawa ich. Posiadam silnik TFS: 0.3.6 z Real Mapa...
A o to bledy wyskakujace w silniku:
Imageshack - wsilniku.png
A to skrypty do tych bledow:
Niebieski plik data/lib/database
Zolty data/movements/script/tomb <<<<skrypt na ogol dziala tylko po wykorzystaniu go pojawia sie blad w silniku (nie debuguje go)
Bardzo prosze o szybka odpowiedz.
Za pomoc oczywiscie reput poleci
PS.. Jezeli cos nie wyraznie wyjasnilem prosze pisac to poprawie sie.
Pozdrawiam.
Danabur
No wiec tak: Mam pewien problem z naprawieniem bledow w silniku i sam mam trudnosci z naprawa ich. Posiadam silnik TFS: 0.3.6 z Real Mapa...
A o to bledy wyskakujace w silniku:
Imageshack - wsilniku.png
A to skrypty do tych bledow:
Niebieski plik data/lib/database
Kod:
if(result == nil) then
print("> WARNING: Couldn't load database lib.")
return
end
Result = createClass(nil)
Result:setAttributes({
id = -1,
query = ""
})
function Result:getID()
return self.id
end
function Result:setID(_id)
self.id = _id
end
function Result:getQuery()
return self.query
end
function Result:setQuery(_query)
self.query = _query
end
function Result:create(_query)
self:setQuery(_query)
local _id = db.storeQuery(self:getQuery())
if(_id) then
self:setID(_id)
end
return self:getID()
end
function Result:getRows(free)
local free = free or false
if(self:getID() == -1) then
error("[Result:getRows] Result not set!")
end
local c = 0
repeat
c = c + 1
until not self:next()
local _query = self:getQuery()
self:free()
if(not free) then
self:create(_query)
end
return c
end
function Result:getDataInt(s)
if(self:getID() == -1) then
error("[Result:getDataInt] Result not set!")
end
return result.getDataInt(self:getID(), s)
end
function Result:getDataLong(s)
if(self:getID() == -1) then
error("[Result:getDataLong] Result not set!")
end
return result.getDataLong(self:getID(), s)
end
function Result:getDataString(s)
if(self:getID() == -1) then
error("[Result:getDataString] Result not set!")
end
return result.getDataString(self:getID(), s)
end
function Result:getDataStream(s)
if(self:getID() == -1) then
error("[Result:getDataStream] Result not set!")
end
return result.getDataStream(self:getID(), s)
end
function Result:next()
if(self:getID() == -1) then
error("[Result:next] Result not set!")
end
return result.next(self:getID())
end
function Result:free()
if(self:getID() == -1) then
error("[Result:free] Result not set!")
end
self:setQuery("")
local ret = result.free(self:getID())
self:setID(-1)
return ret
end
Result.numRows = Result.getRows
function db.getResult(query)
if(type(query) ~= 'string') then
return nil
end
local ret = Result:new()
ret:create(query)
return ret
end
Zolty data/movements/script/tomb <<<<skrypt na ogol dziala tylko po wykorzystaniu go pojawia sie blad w silniku (nie debuguje go)
Kod:
local config = {
[60063] = {{x=33073, y=32589, z=13}, {x=33079,y=32589,z=13}},
[60064] = {x=33072,y=32589,z=13},
[60065] = {{x=33098,y=32816,z=13}, {x=33093,y=32824,z=13}},
[60066] = {x=33097,y=32815,z=13},
[60067] = {{x=33135,y=32682,z=12}, {x=33130,y=32683,z=12}},
[60068] = {x=33136,y=32683,z=12},
[60069] = {{x=33161,y=32831,z=10}, {x=33156,y=32832,z=10}},
[60070] = {x=33162,y=32832,z=10},
[60071] = {{x=33233,y=32692,z=13}, {x=33234,y=32687,z=13}},
[60072] = {x=33234,y=32693,z=13},
[60073] = {{x=33240,y=32855,z=13}, {x=33246,y=32850,z=13}},
[60074] = {x=33239,y=32856,z=13},
[60075] = {{x=33276,y=32552,z=14}, {x=33271,y=32553,z=14}},
[60076] = {x=33277,y=32553,z=14},
[60077] = {{x=33293,y=32741,z=13}, {x=33299,y=32742,z=13}},
[60078] = {x=33292,y=32742,z=13}
}
function onStepIn(cid, item, pos, fromPosition)
if(config[item.uid]) then
if(type(config[item.uid]) == "table") then
local coin = getTileItemById(config[item.uid][1], 2159).uid
if(coin > 0) then
doRemoveItem(coin, 1)
doSendMagicEffect(config[item.uid][1], CONST_ME_HITBYFIRE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, config[item.uid][2], FALSE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
else
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, config[item.uid], FALSE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
end
return TRUE
end
Bardzo prosze o szybka odpowiedz.
Za pomoc oczywiscie reput poleci
PS.. Jezeli cos nie wyraznie wyjasnilem prosze pisac to poprawie sie.
Pozdrawiam.
Danabur
dziala poprawnie. Oczywiscie reput leci!!!