Witajcie!
Mam problem z jednym skryptem:
Po ubiciu dostaję taki error:
[10:15:11.532] [Error - CreatureScript Interface]
[10:15:11.532] data/creaturescripts/scripts/caps.lua:eek:nKill
[10:15:11.532] Description:
[10:15:11.532] data/creaturescripts/scripts/caps.lua:8: attempt to call global 'isSummon' (a nil value)
[10:15:11.532] stack traceback:
[10:15:11.532] data/creaturescripts/scripts/caps.lua:8: in function <data/creaturescripts/scripts/caps.lua:6>
Mam problem z jednym skryptem:
Kod Lua:
- local config = {
- ['xxx'] = {amount = 1, storage = 190700}, ----- write name of monster and any empty storage
- ['xxx'] = {amount = 1, storage = 19001} ---- same here
- }
- local Reward_boss = {2280,2278,2263,2275,2646,2272,2160} -- put here id of most items to be won
- function onKill(cid, target)
- local monster = config[getCreatureName(target):lower()]
- if isPlayer(target) or not monster or isSummon(target) then
- return true
- end
- local Reward = Reward_boss[math.random(1, #Reward_boss)]
- if (getPlayerStorageValue(cid, monster.storage)+1) < monster.amount then
- setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
- end
- if (getPlayerStorageValue(cid, monster.storage)+1) == monster.amount then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..getCreatureName(target)..' and received '..getItemNameById(Reward)..'.')
- doPlayerAddItem(cid, Reward,1)
- end
- return true
- end
Po ubiciu dostaję taki error:
[10:15:11.532] [Error - CreatureScript Interface]
[10:15:11.532] data/creaturescripts/scripts/caps.lua:eek:nKill
[10:15:11.532] Description:
[10:15:11.532] data/creaturescripts/scripts/caps.lua:8: attempt to call global 'isSummon' (a nil value)
[10:15:11.532] stack traceback:
[10:15:11.532] data/creaturescripts/scripts/caps.lua:8: in function <data/creaturescripts/scripts/caps.lua:6>








