23.09.2012, 05:31
i am getting these 4 error i dont know how to fix them
that would be nice if you would help me out.
Here Is The Code.
And The Errors..
that would be nice if you would help me out.
Here Is The Code.
Код:
Timer:ServerMicrobeat[250]() { new Float: fExpHealth, Float: fCurrentSpeed, iVehicle, szSpeed[42], arrVehParams[7], arrDamage[4]; foreach(Player, i) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { if(arr_Towing[i] != INVALID_VEHICLE_ID) { if(GetVehicleModel(arr_Towing[i]) && IsVehicleStreamedIn(arr_Towing[i], i)) AttachTrailerToVehicle(arr_Towing[i], GetPlayerVehicleID(i)); else arr_Towing[i] = INVALID_VEHICLE_ID; } fCurrentSpeed = player_get_speed(i); if(PlayerInfo[i][pAdmin] <= 1) switch(Seatbelt[i]) { case 0: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - (fVehSpeed[i] - fCurrentSpeed) / 2.0); default: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - ((fVehSpeed[i] - fCurrentSpeed) / 4.0); } fVehSpeed[i] = fCurrentSpeed; iVehicle = GetPlayerVehicleID(i); GetVehicleHealth(iVehicle,fExpHealth); if(fExpHealth < 350.0) { SetVehicleHealth(iVehicle, 251.0); GetVehicleParamsEx(iVehicle, arrVehParams[0], arrVehParams[1], arrVehParams[2], arrVehParams[3], arrVehParams[4], arrVehParams[5], arrVehParams[6]); if(arrVehParams[0] == VEHICLE_PARAMS_ON) SetVehicleParamsEx(iVehicle,VEHICLE_PARAMS_OFF, arrVehParams[1], arrVehParams[2], arrVehParams[3], arrVehParams[4], arrVehParams[5], arrVehParams[6]); GameTextForPlayer(i, "~r~Totalled!", 2500, 3); arr_Engine{iVehicle} = 0; } else if(PlayerInfo[i][pSpeedo] != 0 && FindTimePoints[i] == 0 && arr_Engine{iVehicle} == 1) { format(szSpeed, sizeof(szSpeed),"~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~%.0f MPH", fCurrentSpeed); GameTextForPlayer(i, szSpeed, 1500, 3); } for(new s=0;s<10;s++) { if(SpikeStrips[s][sX] != 0) // Reduced from three vars to one { if(VehicleToPoint( 3.0, iVehicle, SpikeStrips[s][sX], SpikeStrips[s][sY], SpikeStrips[s][sZ])) { GetVehicleDamageStatus(iVehicle, arrDamage[0], arrDamage[1], arrDamage[2], arrDamage[3]); arrDamage[3] = encode_tires(1, 1, 1, 1); UpdateVehicleDamageStatus(iVehicle, arrDamage[0], arrDamage[1], arrDamage[2], arrDamage[3]); } } } } else if(GetPlayerState(i) == PLAYER_STATE_PASSENGER) { fCurrentSpeed = player_get_speed(i); if(PlayerInfo[i][pAdmin] <= 1) switch(Seatbelt[i]) { case 0: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - (fVehSpeed[i] - fCurrentSpeed) / 2.0); default: if(fVehSpeed[i] - fCurrentSpeed > 40.0) GetPlayerHealth(i, fExpHealth), SetPlayerHealth(i, fExpHealth - ((fVehSpeed[i] - fCurrentSpeed) / 4.0)); } fVehSpeed[i] = fCurrentSpeed; } } }
Код:
C:\Documents and Settings\User\Desktop\New Folder\N-rp backup\npcmodes\Test123.pwn(95959) : error 017: undefined symbol "fVehSpeed" C:\Documents and Settings\User\Desktop\New Folder\N-rp backup\npcmodes\Test123.pwn(95959) : warning 215: expression has no effect C:\Documents and Settings\User\Desktop\New Folder\N-rp backup\npcmodes\Test123.pwn(95959) : error 001: expected token: ";", but found "]" C:\Documents and Settings\User\Desktop\New Folder\N-rp backup\npcmodes\Test123.pwn(95959) : warning 215: expression has no effect C:\Documents and Settings\User\Desktop\New Folder\N-rp backup\npcmodes\Test123.pwn(95959) : error 001: expected token: ";", but found ")" C:\Documents and Settings\User\Desktop\New Folder\N-rp backup\npcmodes\Test123.pwn(95959) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.