17.05.2011, 11:38
(
Последний раз редактировалось Drebin; 17.05.2011 в 12:46.
Причина: Problem with tag missmatch
)
I got an include for missions in my own script. I use it to create ambulance missions. Here are the things I defined:
Here is my /work command:
So when I type /work the script takes a random load and unload location and a random disease and prints "Reporting -disease- at -location-. Go and help [...]
But the compiler says there is a tag missmatch in this line:
wich leads to a wrong execution of the command.
Maybe I'm too dumb or just blind, but I am a beginner
Would be nice if someone could give me a solution/hint
MissionNameStart = disease (eg. "man with broken leg")
MissionName = name of location (eg. "Dillimore")
Код:
enum AmbulanceMissionInfo
{
MissionName[200],
bool:UseTrailerCheck,
MissionPay,
Float:loadx,
Float:loady,
Float:loadz,
Float:unloadx,
Float:unloady,
Float:unloadz
}
new AmbulanceMissionRandom[][AmbulanceMissionInfo] =
{
{"-location name-", false, 1500, 383.7271,-2032.1228,7.8359, 2034.2332,-1412.2445,16.9922}
};
enum AmbulanceMissionNames
{
MissionNameStart[200]
}
new AmbulanceMissionBegin[][AmbulanceMissionInfo] =
{
{"disease name here-"}
};
Код:
if (pvehiclemodel == 416) //if vehicle = ambulance
{
new string[200];
new rand = random(sizeof(AmbulanceMissionRandom));
new NameRand = random(sizeof(AmbulanceMissionBegin));
CreatePlayerMission(playerid, AmbulanceMissionRandom[rand][UseTrailerCheck], AmbulanceMissionRandom[rand][MissionPay], AmbulanceMissionRandom[rand][loadx],AmbulanceMissionRandom[rand][loady], AmbulanceMissionRandom[rand][loadz], AmbulanceMissionRandom[rand][unloadx],AmbulanceMissionRandom[rand][unloady], AmbulanceMissionRandom[rand][unloadz]);
format(string, sizeof(string),"{FF3F3F}Reporting {FFFFFF}%s{FF3F3F} at {FFFFFF}%s{FF3F3F} ! Go and help him, then bring him to the hospital", AmbulanceMissionBegin[NameRand][MissionNameStart], AmbulanceMissionRandom[rand][MissionName]);
SendClientMessage(playerid, 0x00FF00FF, string);
return 1;
}
But the compiler says there is a tag missmatch in this line:
Код:
format(string, sizeof(string),"{FF3F3F}Reporting {FFFFFF}%s{FF3F3F} at {FFFFFF}%s{FF3F3F} ! Go and help him, then bring him to the hospital", AmbulanceMissionBegin[NameRand][MissionNameStart], AmbulanceMissionRandom[rand][MissionName]);
Maybe I'm too dumb or just blind, but I am a beginner

Would be nice if someone could give me a solution/hint
MissionNameStart = disease (eg. "man with broken leg")
MissionName = name of location (eg. "Dillimore")

