Auto-translated
And do you also have an asterisk in your script? Perhaps it was interpreted as some kind of pointer...
New here? I'm Roha — want a quick tour?
Do you also have an asterisk in your script? Maybe it was interpreted as some kind of pointer...
Good afternoon, the console displays the following error: (Script) ERROR: "=" expected
The script itself looks like this:
void GiveArtefact("Brem", 13, nBindToHero=0);
What is the error here?
I suspect that this script is written incorrectly.
GiveArtefact(heroname, artefactID, [bindToHero = 0]);
As I understand it, the 3rd parameter can be left blank altogether. But you have written nBindToHero.
Please help me with a script. I need peasants to join my hero, a quest to appear, and the quest requires reaching a specific point with them and completing the quest there, after which they should disappear from the squad. If the peasants die in battle, the quest should fail. (I can more or less write the initial stages, but I don't know how to make the quest fail after the peasants die.)
Added 4 hours 52 minutes ago
Please help me figure out what the error is in the script:function demon()
local p1 =GetObjectiveState ('qwert1',PLAYER_1);
local p =GetObjectiveState ('qwert2',PLAYER_1);
local opr = 9
local opr3 = 13
local p2 = GetObjectiveState ('qwert3', 1);
if p2 == OBJECTIVE_COMPLETED then
* opr= opr+1
* if p2 == OBJECTIVE_COMPLETED then
* * opr= opr3+1
* * if p1 ==OBJECTIVE_COMPLETED and GetDate(DAY_OF_WEEK ) == 6
* * * then
* * * AddObjectCreatures('gar_1', opr, 15);
* * * AddObjectCreatures('gar_2', opr, 15);
* * * AddObjectCreatures('gar_3', opr, 15);
* * * AddObjectCreatures('gar_4', opr, 15);
* * elseif p ==OBJECTIVE_COMPLETED and GetDate(DAY_OF_WEEK ) == 5
* * then
* * AddObjectCreatures('gar_1', opr3, 3);
* * AddObjectCreatures('gar_2', opr3, 3);
* * AddObjectCreatures('gar_3', opr3, 3);
* * AddObjectCreatures('gar_4', opr3, 3);
* * end;
end;
Trigger(NEW_DAY_TRIGGER, 'demon');
It seems like I wrote everything correctly, but the quest is completed, the 5th day comes, the monks don't appear, the 6th day comes, and the angels don't appear either.
function peas_surv()
while 1 do
if GetHeroCreatures("Hero Name", CREATURE_PEASANT)<4 then
SetObjectiveState("Scripted quest name", OBJECTIVE_FAILED, PLAYER_1);
break
end;
sleep(1)
end;
end;startThread(peas_surv)Please help me with a script. I need peasants to join my hero, a quest to appear, and the goal is to lead them to a specific point and complete the quest there, after which they should disappear from the hero's party. If the peasants die in battle, the quest should fail. (I can more or less write the initial stages, but I don't know how to make the quest fail after the peasants die.)
Good evening, I'm trying to post a message about an error that appears in the Map Script Editor program, but the forum keeps deleting one of the words in the message:confused:
Added 10 hours 37 minutes ago
The situation is currently as follows: I replaced the elsafes with ifas that are more familiar to me (based on one of my previous maps), the program stopped complaining about errors, but the seventh-day script still doesn't trigger; no error messages appear in the console either, and of course, this isn't the only problem with the scripts. Thanks to the devs who made a map editor not for mere mortals, but forthe chosen ones(crossed out) programmers :)