Can't fix tag missmatch
#1

I got an include for missions in my own script. I use it to create ambulance missions. Here are the things I defined:
Код:
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-"}
};
Here is my /work command:

Код:
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;
}
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:
Код:
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]);
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")
Reply


Messages In This Thread
Problem with tag missmatch - by Drebin - 17.05.2011, 11:38
AW: Can't fix tag missmatch - by Drebin - 17.05.2011, 14:54
AW: Can't fix tag missmatch - by Drebin - 17.05.2011, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)