15.12.2012, 11:36
Hello,
I keep getting: error 017: undefined symbol "i" with the code below
Any help on how I can fix it??
I keep getting: error 017: undefined symbol "i" with the code below
Код:
public UpdateTextdraw() { new szString[40]; foreach(Player, i) { // AFK if (GetPVarInt(i, "AFK") == 1) TextDrawShowForPlayer(i, afk); else TextDrawHideForPlayer(i, afk); if (IsPlayerInAnyVehicle(i)) { new Float:X, Float:Y, Float:Z; GetPlayerPos(i, X, Y, Z); // FUEL format(szString, 40, "Fuel:~w~ %d", Gas[GetPlayerVehicleID(i)]); TextDrawSetString(TD_0[i], szString); // DIST new Float:Dist; Dist = GetDistanceBetweenPoints(X, Y, Z, IslandX[i], IslandY[i], IslandZ[i]); if (GetPVarInt(i, "Flight") > 0 || GetPVarInt(i, "Work") > 0) { format(szString, 40, "DIST:~w~ %d", floatround(Dist, floatround_round)); TextDrawSetString(TD_4[i], szString); } else { TextDrawSetString(TD_4[i], "DIST:~w~ None"); } // DMG new Float:HP; GetVehicleHealth(GetPlayerVehicleID(i), HP); format(szString, 40, "DMG:~w~ %d", floatround(HP, floatround_round)); TextDrawSetString(TD_3[i], szString); // ALT format(szString, 40, "ALT:~w~ %d", floatround(Z, floatround_ceil)); TextDrawSetString(TD_5[i], szString); // VEHICLE format(szString, 40, "VEH:~w~ %s", GetVehicleFriendlyName(GetPlayerVehicleID(i))); TextDrawSetString(TD_6[i], szString); // STATUS if (GetPVarInt(i, "Work") > 0) { TextDrawSetString(TD_7[i], "Status:~w~ Work"); } if (GetPVarInt(i, "Flight") == 1) { TextDrawSetString(TD_7[i], "Status:~w~ On Route"); } if (GetPVarInt(i, "Flight") == 0) { if (GetPVarInt(i, "Work") == 0) { if (IsAirVehicle(GetPlayerVehicleID(i))) { TextDrawSetString(TD_7[i], "Status:~w~ Flying"); } else { TextDrawSetString(TD_7[i], "Status:~w~ None"); } } }