• 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!

Lua nil value error in boss raid script

alcapone

Member
Joined
Jan 13, 2021
Messages
246
Reaction score
19
Lua:
function onRaid()   
        Game.setStorageValue(GlobalStorage.boss, 4)
      
end

is registered in the storage lib

2021-03-20 18:39:08 - Lua Script Error: [Raid Interface]
2021-03-20 18:39:08 - data/raids/scripts/boss.lua:eek:nRaid
2021-03-20 18:39:08 - data/raids/scripts/boss.lua:2: attempt to call global 'setGlobalStorageValue' (a nil value)
2021-03-20 18:39:08 - stack traceback:
2021-03-20 18:39:08 - [C]: in function 'setGlobalStorageValue'
2021-03-20 18:39:08 - data/raids/scripts/boss.lua:2: in function <data/raids/scripts/boss.lua:1>
 
Im on mobile pls only the raid part
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<raids>
    <!-- Yalahar -->
    <raid name="boss" file="yalahar/boss.xml" interval2="500" margin="60" />
   
</raids>
raid xml



Lua:
<?xml version="1.0" encoding="utf-8"?>
<raid>
    <announce delay = "1000" type = "Event" message = "Something is rumbling deep underground all over the world" />
         <script delay="1000" script="boss.lua" />
</raid >

tfs 1x+
 
Stop prank?
boss.lua is in the first post.

Lua:
function onRaid() 
    Game.setStorageValue(GlobalStorage.boss, 4)
end

I am confused.
Error says boss.lua:2: attempt to call global 'setGlobalStorageValue' (a nil value)

you are showing Game.setStorageValue(GlobalStorage.boss, 4)

Where is setGlobalStorageValue used?

Do you have this?
 
Stop prank?
boss.lua is in the first post.

Lua:
function onRaid() 
    Game.setStorageValue(GlobalStorage.boss, 4)
end
The error doesn't match the "script".
The error says it attempts to call 'setGlobalStorageValue', not 'Game.setStorageValue'.

setGlobalStorageValue is a compat function that calls Game.SetStorageValue:
 
I am confused.
Error says boss.lua:2: attempt to call global 'setGlobalStorageValue' (a nil value)

you are showing Game.setStorageValue(GlobalStorage.boss, 4)

Where is setGlobalStorageValue used?

Do you have this?
is that I was testing others that I was finding on the forum

lib
compat
Lua:
function getGlobalStorageValue(key)
    return Game.getStorageValue(key) or -1
end

function setGlobalStorageValue(key, value)
    Game.setStorageValue(key, value)
    return true
end
 
Back
Top