Do somebody has an idea where the issue comes from?!?
"Komag" I toke off this :
onAttack = function (self, weapon)
return damage.whatWeapon(self, weapon)
end,
But the game continue to crash anyway...
"Crisman" could you explain exactly what you did to make it works (step by step) please!
Rest and Rewards
Re: Rest and Rewards
try as we suggested and put print messages at each step to see where the crash is.
It looks like your hook is fine, it simply will run the function when the player rests.
Your function is where the problem is at:
Don't "return true", that might be what's crashing the editor, as it's trying to return a true value to something that didn't ask for it. If you want the rest of the function to stop if the restCount it >= 6 then just "return", not "return true"
for the d you need to leave off :close() on the line where you define the local variable. If the "return true" wasn't the problem then the first :close() is.
It looks like your hook is fine, it simply will run the function when the player rests.
Your function is where the problem is at:
Code: Select all
function doRest()
if restCount >= 6 then
return true
end
restCount = restCount + 1
local d = findEntity("restDoor"..restCount):close()
if d then d:close() end
end
for the d you need to leave off :close() on the line where you define the local variable. If the "return true" wasn't the problem then the first :close() is.
Code: Select all
function doRest()
if restCount >= 6 then return end
restCount = restCount + 1
local d = findEntity("restDoor"..restCount)
if d then d:close() end
end
Finished Dungeons - complete mods to play
Re: Rest and Rewards
It's working! Thank you very much guys!