As the title says, I am trying to figure out what I replace doPlayerSetLossPercent with in 1.0.
Example:
Error:
Sorry for the nub question, seems like this shouldn't have even been switched!
Example:
Code:
function onDeath(cid, corpse)
if isPlayer(cid) then
if (getPlayerLevel(cid) < 100 then
doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)
else
doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 100)
doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 100)
end
end
return true
end
Error:
Code:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/protection.lua:onDeath
data/creaturescripts/scripts/others/protection.lua:4: attempt to call global 'do
PlayerSetLossPercent' (a nil value)
stack traceback:
[C]: in function 'doPlayerSetLossPercent'
data/creaturescripts/scripts/others/protection.lua:4: in function <data/
creaturescripts/scripts/others/protection.lua:1>
Sorry for the nub question, seems like this shouldn't have even been switched!