hello, I implemented this on my server, but I get this error, any solution?
error:
error:
Code:[2023-17-03 11:50:09.429] [error] Lua script error: scriptInterface: [Event Interface] scriptId: [data/events/scripts/monster.lua:Monster@onDropLoot] timerEvent: [] callbackId:[] function: [] error [data/events/scripts/monster.lua:45: attempt to index local 'player' (a nil value) stack traceback: [C]: in function '__index' data/events/scripts/monster.lua:45: in function <data/events/scripts/monster.lua:22>]
funcion:line 45: local skillbonus = player:getSkillLevel(SKILL_FISHING)
Lua:-- SkillBonus local skillbonus = player:getSkillLevel(SKILL_FISHING) if player and player:getSkillLevel(SKILL_FISHING) >= 0 and player:getSkillLevel(SKILL_FISHING) < 100 then skillbonus = skillbonus * 0.2 elseif player and player:getSkillLevel(SKILL_FISHING) > 100 then skillbonus = 100/2 end for i = 1, #monsterLoot do monsterLoot[i].chance = monsterLoot[i].chance + (monsterLoot[i].chance * skillbonus) -- skill bonus