Skip to content
User Avatar
#2877
Auto-translated
DarkLordax
So, what's wrong here!

function pobor1()
if GetObjectiveState("SQ1", 1) ==OBJECTIVE_UNKNOWN then
SetObjectiveState("SQ1", OBJECTIVE_ACTIVE, 1);
MessageBox("Maps/SingleMissions/C1W1/poborQ1.txt", "nothing");
if IsObjectExists("pobornik1") ==false then
if IsObjectExists("pobornik2") ==false then
if IsObjectExists("pobornik3") ==false then
SetObjectiveState("SQ1", OBJECTIVE_COMPLETED, 1);
SetObjectEnabled("dwellquest1", true);
SetObjectOwner("dwellquest1", 1);
Trigger(OBJECT_TOUCH_TRIGGER, "dwellquest1", nil)
end;
end;
end;
elseif GetObjectiveState("SQ1", 1) ==OBJECTIVE_ACTIVE then
if IsObjectExists("pobornik1") ==false then
if IsObjectExists("pobornik2") ==false then
if IsObjectExists("pobornik3") ==false then
MesageBox("Maps/SingleMissions/C1W1/poborEND.txt", "nothing");
SetObjectEnabled("dwellquest1", true);
SetObjectOwner("dwellquest", 1);
SetObjectiveState("SQ1", OBJECTIVE_COMPLETED, 1);
Trigger(OBJECT_TOUCH_TRIGGER, "dwellquest1", nil)
end;
end;
end;
end
end
Trigger(OBJECT_TOUCH_TRIGGER, "dwellquest1", "pobor1")

The almighty console writes ERROR attempt to call a nil value. But where is this nil value!

In short, everything works only if all three enemies (pobornik) are killed before taking the quest; then it will be completed! If you take the quest first, then some nil value pops up!

I wouldn't recommend ever using the word false! It's unlikely that the problem is in it, although who knows, but besides errors in the console, false and true haven't caused anything else for me.

Added 1 minute ago
Using these two words is fundamentally incorrect. There is nil, 0, 1, etc. It already depends on the script command.

Added 52 minutes ago
How can I give a hero Perfect Necromancy?
Карты для героев 5

"Плата за любовь"
"Путь некроманта"
"Темные грани"
"Рок Гримхейма"