Skip to content
User Avatar
#731
Auto-translated
jackysm
function kirassad(heroname)
gold=GetPlayerResource(1,6);
if gold>= 10000 then
QuestionBox(GetMapDataPath().."yeskir.txt","yes","no");
else
MessageBox(GetMapDataPath().."netgolds.txt");
end;
end;

function yes(heroname)
SetPlayerResource(1,6,gold-10000);
sleep(3);
GiveArtefact(heroname,48,0);
sleep(3);
RemoveObject("dvk");
Trigger(OBJECT_ENTER_AND_STOP_TRIGGER,"regdvk",nil);
end;

Trigger(OBJECT_ENTER_AND_STOP_TRIGGER,"regdvk","kirassad");

Take a look, what could be wrong here. I've already checked everything, all the names, and it still doesn't work.

ERROR: Attempt to call a Nil value?

готовность 70% PAUSED
Don't pretend to be a victim.

Statistics

Welcome our newest member: leyu