{
if (DerbyStarted != 2)
{
SendClientMessage(playerid, COLOR_GRAD1, "You can't finish a Derby that didn't /derby start yet");
return 1;
}
DerbyStarted = 0;
new DerbyWinner = 255;
new derbyhealth = 0;
new carssurvived = 0;
new tmphealth;
new derbyid;
for (i=0; i<MAX_PLAYERS; i++)
{
if (DerbyPlayers[i] == 1)
{
derbyid = GetPlayerVehicleID(i);
if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(playerid) && GetVehicleModel(derbyid) == 504)
{
carssurvived++;
GetVehicleHealth(derbyid, tmphealth);
if (tmphealth > derbyhealth)
{
derbyhealth = tmphealth;
DerbyWinner = i;
}
}
}
}
format(string, sizeof(string), "A Derby has finished. %d cars survived.", carssurvived);
SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
if (DerbyWinner != 255)
{
GetPlayerName(DerbyWinner, playername, sizeof(playername));
format(string, sizeof(string), "Our winner is %s, who is getting $%d.", playername, DerbyPrize);
SafeGivePlayerMoney(DerbyWinner, DerbyPrize);
}
else
{
format(string, sizeof(string), "No one survived in current Destruction Derby.");
}
SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
return 1;
}
osc.pwn(13719) : warning 213: tag mismatch
|
Originally Posted by paint36
Help compile failed
Код:
{
if (DerbyStarted != 2)
{
SendClientMessage(playerid, COLOR_GRAD1, "You can't finish a Derby that didn't /derby start yet");
return 1;
}
DerbyStarted = 0;
new DerbyWinner = 255;
new derbyhealth = 0;
new carssurvived = 0;
new tmphealth;
new derbyid;
for (i=0; i<MAX_PLAYERS; i++)
{
if (DerbyPlayers[i] == 1)
{
derbyid = GetPlayerVehicleID(i);
if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(playerid) && GetVehicleModel(derbyid) == 504)
{
carssurvived++;
GetVehicleHealth(derbyid, tmphealth);
if (tmphealth > derbyhealth)
{
derbyhealth = tmphealth;
DerbyWinner = i;
}
}
}
}
format(string, sizeof(string), "A Derby has finished. %d cars survived.", carssurvived);
SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
if (DerbyWinner != 255)
{
GetPlayerName(DerbyWinner, playername, sizeof(playername));
format(string, sizeof(string), "Our winner is %s, who is getting $%d.", playername, DerbyPrize);
SafeGivePlayerMoney(DerbyWinner, DerbyPrize);
}
else
{
format(string, sizeof(string), "No one survived in current Destruction Derby.");
}
SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
return 1;
}
Код:
osc.pwn(13719) : warning 213: tag mismatch _________________________________________________ I am not good English. sorry |
213 tag mismatch A tag mismatch occurs when: ⋄ assigning to a tagged variable a value that is untagged or that has a different tag ⋄ the expressions on either side of a binary operator have different tags ⋄ in a function call, passing an argument that is untagged or that has a different tag than what the function argument was defined with ⋄ indexing an array which requires a tagged index with no tag or a wrong tag name
new tmphealth;
new derbyhealth;
new Float:tmphealth;
new Float:derbyhealth;
|
Originally Posted by JeNkStAX
Edit: Damn Donny got it before me
![]() |
|
Originally Posted by Donny
Quote:
![]() |