• 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!

Lua Problem With Alchemy

Trader

New Member
Joined
Aug 12, 2009
Messages
219
Reaction score
2
Code:
[19/09/2010 13:45:04] [Error - Action Interface] 
[19/09/2010 13:45:04] buffer:onUse
[19/09/2010 13:45:04] Description: 
[19/09/2010 13:45:04] [string "loadBuffer"]:7: attempt to call global 'getCustomSkill' (a nil value)
[19/09/2010 13:45:05] stack traceback:
[19/09/2010 13:45:05]     [string "loadBuffer"]:7: in function <[string "loadBuffer"]:5>

[19/09/2010 13:45:08] [Error - Action Interface] 
[19/09/2010 13:45:08] buffer:onUse
[19/09/2010 13:45:08] Description: 
[19/09/2010 13:45:08] [string "loadBuffer"]:3: attempt to index global 't' (a nil value)
[19/09/2010 13:45:09] stack traceback:
[19/09/2010 13:45:09]     [string "loadBuffer"]:3: in function <[string "loadBuffer"]:2>

[19/09/2010 13:46:16] [Error - Action Interface] 
[19/09/2010 13:46:17] buffer:onUse
[19/09/2010 13:46:17] Description: 
[19/09/2010 13:46:17] [string "loadBuffer"]:3: attempt to index global 't' (a nil value)
[19/09/2010 13:46:17] stack traceback:
[19/09/2010 13:46:18]     [string "loadBuffer"]:3: in function <[string "loadBuffer"]:2>
[19/09/2010 13:48:01] > Broadcasted message: "Full server save within 120 seconds, please mind it may freeze!".
[19/09/2010 13:49:32] > Broadcasted message: "Full server save within 30 seconds, please mind it may freeze!".
[19/09/2010 13:50:02] > Saving server...
[19/09/2010 13:50:09] > SAVE: Complete in 6.318 seconds using relational house storage.

[19/09/2010 13:50:32] [Error - MoveEvents Interface] 
[19/09/2010 13:50:32] buffer:onAddItem
[19/09/2010 13:50:32] Description: 
[19/09/2010 13:50:32] [string "t =  {..."]:11: unexpected symbol near '['

[19/09/2010 13:50:33] [Error - MoveEvents Interface] 
[19/09/2010 13:50:33] buffer:onAddItem
[19/09/2010 13:50:33] Description: 
[19/09/2010 13:50:34] [string "loadBuffer"]:18: attempt to index global 't' (a nil value)
[19/09/2010 13:50:34] stack traceback:
[19/09/2010 13:50:34]     [string "loadBuffer"]:18: in function <[string "loadBuffer"]:2>

[19/09/2010 13:50:38] [Error - MoveEvents Interface] 
[19/09/2010 13:50:38] buffer:onAddItem
[19/09/2010 13:50:39] Description: 
[19/09/2010 13:50:39] [string "t =  {..."]:11: unexpected symbol near '['

[19/09/2010 13:50:39] [Error - MoveEvents Interface] 
[19/09/2010 13:50:40] buffer:onAddItem
[19/09/2010 13:50:40] Description: 
[19/09/2010 13:50:40] [string "loadBuffer"]:18: attempt to index global 't' (a nil value)
[19/09/2010 13:50:40] stack traceback:
[19/09/2010 13:50:41]     [string "loadBuffer"]:18: in function <[string "loadBuffer"]:2>

[19/09/2010 13:50:48] [Error - MoveEvents Interface] 
[19/09/2010 13:50:48] buffer:onAddItem
[19/09/2010 13:50:48] Description: 
[19/09/2010 13:50:49] [string "t =  {..."]:11: unexpected symbol near '['

[19/09/2010 13:50:49] [Error - MoveEvents Interface] 
[19/09/2010 13:50:49] buffer:onAddItem
[19/09/2010 13:50:50] Description: 
[19/09/2010 13:50:50] [string "loadBuffer"]:18: attempt to index global 't' (a nil value)
[19/09/2010 13:50:50] stack traceback:
[19/09/2010 13:50:50]     [string "loadBuffer"]:18: in function <[string "loadBuffer"]:2>

How do I fix these errors?
Help would be awesome, thanks
 
Hey add these in ur functions list

Lua:
function getCustomSkill(cid, storage)
        return getPlayerStorageValue(cid, storage)
end
 
function addCustomSkill(cid, skillName, storage)
        local skillStorage = math.max(10, getPlayerStorageValue(cid, storage))
        local skillTries =  math.max(0, getPlayerStorageValue(cid, storage+1))
 
        doPlayerSetStorageValue(cid, storage, skillStorage+1)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You advanced in " .. skillName .. ".")
        doPlayerSetStorageValue(cid, storage+1, 0)
end
 
function addCustomSkillTry(cid, skillName, storage)
        local skillStorage = math.max(10, getPlayerStorageValue(cid, storage))
        local skillTries =  math.max(0, getPlayerStorageValue(cid, storage+1))
 
                doPlayerSetStorageValue(cid, storage+1, skillTries+getConfigInfo("rateSkill"))
 
        if skillTries >= math.floor(20 * math.pow(1.1, (skillStorage-11)) / getConfigInfo("rateSkill")) then
                addCustomSkill(cid, skillName, storage)
        end
end
 
function getCustomSkillPercent(cid, storage)
        local skillStorage = math.max(10, getPlayerStorageValue(cid, storage))
        local skillTries =  math.max(0, getPlayerStorageValue(cid, storage+1))
        local triesNeeded = math.floor(20 * math.pow(1.1, (skillStorage-11)) / getConfigInfo("rateSkill"))
return math.floor(100*(1-skillTries / triesNeeded))
end

or better read the thread again ;P
http://otland.net/f81/mod-alchemy-system-new-update-85584/
 
Back
Top