Fix a bug when trying to disband a faction is perms array is nil
parent
fd2f2fe658
commit
74ee1929d7
21
ROADMAP
21
ROADMAP
|
@ -290,6 +290,27 @@ mods/pathogen/gravititus/init.lua:36: attempt to index local 'digger' (a nil val
|
|||
- [ ] We should be able to change style (#navigation not so large)
|
||||
We could replace doc/luadoc.css directly
|
||||
|
||||
**** Doesn't run on 5.3.0 client
|
||||
:LOGBOOK:
|
||||
CLOCK: [2020-12-06 dim. 13:52]--[2020-12-06 dim. 14:00] => 0:08
|
||||
:END:
|
||||
ModError: Failed to load and run script from \mods\hopper\init.lua:
|
||||
2020-08-16 15:49:47: ERROR[Main]: Unknown node: default:chest
|
||||
2020-08-16 15:49:47: ERROR[Main]: stack traceback:
|
||||
2020-08-16 15:49:47: ERROR[Main]: [C]: in function 'get_content_id'
|
||||
2020-08-16 15:49:47: ERROR[Main]: ...64\bin\..\games\minetest-pvp-master\mods\hopper\init.lua:3: in main chunk
|
||||
2020-08-16 15:49:47: ACTION[Main]: Server: Shutting down
|
||||
|
||||
see https://dev.minetest.net/Changelog#5.2.0_.E2.86.92_5.3.0
|
||||
=minetest.get_content_id: throw error for unknown nodes (HybridDog)=
|
||||
|
||||
- [X] Got a bug in faction \disband
|
||||
factions.lua:275 bad arg to 'ipairs' (table expected, got nil)
|
||||
A simple =/factions disband= in the chat make the test
|
||||
- [ ] Another xpro issue
|
||||
- pasta e/ou arquivo inexiste(s) (em memor.ler)
|
||||
Registro acessado inexiste (xpro/jogador/xo) en memor.consultar)
|
||||
- [ ] Factions list not updated till we click on the list widget
|
||||
**** DONE [feature_FactionUI] Try to add a factions UI
|
||||
:LOGBOOK:
|
||||
CLOCK: [2020-03-18 mer. 22:26]--[2020-03-18 mer. 22:41] => 0:15
|
||||
|
|
2
TODO
2
TODO
|
@ -11,4 +11,4 @@ minetest-solebull - LGPL-2.1 - A PVP/faction game for minetest based on Cobalt.
|
|||
|
||||
|
||||
* v0.0.2-9 (27 May 2020 - ???) CLOC ???,???
|
||||
|
||||
- (1) Fix a bug when trying to disband a faction is perms array is nil
|
||||
|
|
|
@ -272,6 +272,13 @@ function factions.Faction.has_permission(self, player, permission)
|
|||
return false
|
||||
end
|
||||
local perms = self.ranks[p]
|
||||
|
||||
-- Trying to fix a 'bad arg to 'ipairs' (table expected, got nil)' error
|
||||
if perms == nil then
|
||||
minetest.chat_send_player(player, "Can't check your permissions. perms array is nil!")
|
||||
return false
|
||||
end
|
||||
|
||||
for i in ipairs(perms) do
|
||||
if perms[i] == permission then
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue