Zombiegod
Member
- Joined
- Oct 22, 2009
- Messages
- 198
- Solutions
- 1
- Reaction score
- 24
so i am using this script Action - [TFS 1.1] Fishing monsters (https://otland.net/threads/tfs-1-1-fishing-monsters.229702/)
and whenever i first load the server it complains about this
and wont let me fish, (they are all valid monsters) however if i /reload actions, it fixes and i can fish monsters like normal.
My guess it it has to do with the code being loaded before monsters get loaded, and that when i reload it registers the now loaded monsters.
The part of the code that spits out the error is this.
and whenever i first load the server it complains about this
Code:
Monster fishing::Warning - Invalid monster name: Sea Serpent
Monster fishing::Warning - Invalid monster name: Rotworm
Monster fishing::Warning - Invalid monster name: Dragon
Monster fishing::Warning - Invalid monster name: Rat
Monster fishing::Warning - Invalid monster name: storage
Monster fishing::Warning - Invalid monster name: EXP
Monster fishing::Warning - Invalid monster name: Serpent Spawn
Monster fishing::Warning - Invalid monster name: Wyrm
Monster fishing::Warning - Invalid monster name: Sea Serpent
Monster fishing::Warning - Invalid monster name: Rotworm
Monster fishing::Warning - Invalid monster name: Dragon
Monster fishing::Warning - Invalid monster name: Rat
Monster fishing::Warning - Invalid monster name: storage
Monster fishing::Warning - Invalid monster name: EXP
Monster fishing::Warning - Invalid monster name: Serpent Spawn
Monster fishing::Warning - Invalid monster name: Wyrm
and wont let me fish, (they are all valid monsters) however if i /reload actions, it fixes and i can fish monsters like normal.
My guess it it has to do with the code being loaded before monsters get loaded, and that when i reload it registers the now loaded monsters.
The part of the code that spits out the error is this.
Lua:
if config.verifyMonsters then
local m = {}
for minLevel, monsters in pairs(config.monsters) do
m[minLevel] = {}
if config.debug then print("#monsters", #monsters) end
for i = 1, #monsters do
if MonsterType(monsters[i]) then
table.insert(m[minLevel], monsters[i])
else
print("Monster fishing::Warning - Invalid monster name:", monsters[i])
end
end
if config.debug then print("Monster fishing::Debug - #monsters added", #m[minLevel]) end
end
config.monsters = m
end