From 5097ecd3440c1283bd08b413cb0b92a0bb9376c9 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 8 Jan 2014 18:03:35 +0000 Subject: [PATCH] Fix possible diplomacy bug --- mods/capturetheflag/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/capturetheflag/init.lua b/mods/capturetheflag/init.lua index b549b6a..049882b 100644 --- a/mods/capturetheflag/init.lua +++ b/mods/capturetheflag/init.lua @@ -216,7 +216,9 @@ function cf.diplo.get(one,two) end function cf.diplo.set(one,two,state) - if cf.diplo.diplo then + if not cf.diplo.diplo then + cf.diplo.diplo = {} + else for i=1,#cf.diplo.diplo do local dip = cf.diplo.diplo[i] if (dip.one == one and dip.two == two) or (dip.one == two and dip.two == one) then