error message in vars

This commit is contained in:
p.kosyh 2010-06-18 09:50:06 +00:00
parent e0acccdd81
commit 06d7cc0fce

View file

@ -20,6 +20,9 @@ function __vars_fill(v)
if tonumber(k) and type(o) == 'string' then
stead.table.insert(vars, o)
else
if v[k] then
error ("Variable overwrites object property: "..tostring(k));
end
v[k] = o
stead.table.insert(vars, k);
end