Auto-translated
function Turma ()
while (1) do
if b == 0 and w == 0 then
MessageBox("/Maps/SingleMissions/rework (4)/turmaLOCK.txt");
end
if b == 1 and w == 1 and var == 1 then
MessageBox("/Maps/SingleMissions/rework (4)/turmaUNLOCK.txt");
SetObjectiveState("suppDruid", OBJECTIVE_COMPLETE);
RemoveObject("druid");
RemoveObject("elf1");
RemoveObject("elf2");
RemoveObject("elf3");
RemoveObject("elf4");
RemoveObject("elf5");
RemoveObject("elf6");
RemoveObject("elf7");
RemoveObject("elf8");
MessageBox("/Maps/SingleMissions/rework (4)/unicorn.txt");
OpenCircleFog(198, 64, 0, 2, PLAYER_1)
MoveCamera(198, 64, 0, 30, 1.3, 1, 1, 1, 1);
sleep(5)
PlayObjectAnimation("unicorn", "happy", ONESHOT_STILL);
sleep(15)
RemoveObject("unicorn");
end
if b == 1 and w == 1 and a == 1 then
MessageBox("/Maps/SingleMissions/rework (4)/turmaDEAD.txt")
end
Trigger(OBJECT_TOUCH_TRIGGER, "turma");
break
end
end;
Trigger(OBJECT_TOUCH_TRIGGER, "turma", "Turma" );
```
Question about complexity. There is an object called "Turma". I need a specific message to appear when it is touched, depending on the conditions specified in the script. My problem is that when it is touched for the first time, everything works fine (the first condition, when b and w == 0), but when b == 1, w == 1, and var == 1, it gives an error. The same happens when b == 1, w == 1, and a == 1.
Here is the error:

Here are the conditions that set the coefficients:
```
function QochComplete ()
while (1) do
sleep(2);
if (Exists('white') == nil) then
SetObjectiveState("Qo-ch", OBJECTIVE_COMPLETED);
w = 1
break
end
end
end
startThread(QochComplete)
function QobComplete ()
while (1) do
sleep (2)
if (Exists('black') == nil) then
SetObjectiveState("Qo-b", OBJECTIVE_COMPLETED);
b = 1
break
end
end
end
startThread(QobComplete)