• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

monster:setReward tfs 1.3

Dorianek

Member
Joined
Nov 29, 2018
Messages
252
Reaction score
10
Location
Poland
Example

C++:
function onRaid()
    local monster = Game.createMonster("Mad Mage", Position(33360, 31873, 9))
     monster:setReward(true)
end

Console

C++:
data/raids/scripts/mad_mage.lua:onRaid
data/raids/scripts/mad_mage.lua:4: attempt to call method 'setReward' (a nil value)
stack traceback:
        [C]: in function 'setReward'
        data/raids/scripts/mad_mage.lua:4: in function <data/raids/scripts/mad_mage.lua:1>
 
Example

C++:
function onRaid()
    local monster = Game.createMonster("Mad Mage", Position(33360, 31873, 9))
     monster:setReward(true)
end

Console

C++:
data/raids/scripts/mad_mage.lua:onRaid
data/raids/scripts/mad_mage.lua:4: attempt to call method 'setReward' (a nil value)
stack traceback:
        [C]: in function 'setReward'
        data/raids/scripts/mad_mage.lua:4: in function <data/raids/scripts/mad_mage.lua:1>
I think you do not have this function in your distro or datapack

try this
 
Back
Top