LuaObject? findVar(String id) { Scope? next = this; while (next != null) { if (next.vars.containsKey(id)) { return next.vars[id]!; } next = next.parent; } // Not found return null; }