Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
I'm completely out of ideas, I don't understand anything anymore.
In MapScript, I have the following:
geroy = "Raelag";
SetGameVar("Raelag", geroy);
print("The main character has been named");
SetHeroCombatScript('Raelag', "/Maps/SingleMissions/Koto_Map_New/CombatScript.xdb#xpointer(/Script)");
print("Combat script launched");
Here, everything seems to be in order, and the console confirms it.
In CombatScript, I have the following:
geroy = GetGameVar("Raelag");
if GetHeroName(GetAttackerHero()) == geroy then
print("if the main character is the aggressor");
SetUnitManaPoints(GetAttackerHero(), 200);
print("mana given");
sleep(1)
UnitCastAimedSpell(GetAttackerHero(), 4);
print("casting");
end;
if GetHeroName(GetDefenderHero()) == geroy then
print("if the main character is the defender");
SetUnitManaPoints(GetDefenderHero(), 200);
print("mana given");
sleep(1)
UnitCastAimedSpell(GetDefenderHero(), 4);
print("casting");
end;
And in tactical mode, the following error appears:
Value was NIL when getting global with name 'SetHeroCombatScript'.
Attempt to call a nil value.
Where is the null value when I seem to have written that geroy = "Raelag"?
Help, kind people, please tell me what I need to write here?
Do I need to make if GetHeroName a function? Yes, it seems like MapScriptsEditor complains about that.
Added 5 minutes ago
Or is this, after all, a problem with the game not recognizing the combat script at the specified address?
Added 2 minutes ago
P.S., yes, I know that commas are missing after sleep here. But they are not missing in the script, and it doesn't even get to sleep.