C:\Users\crввzя\Desktop\satdm\gamemodes\SATDMv12.pwn(89088) : warning 209: function "AC_BS_SetPlayerArmour" should return a value
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) {
new vehicle = GetPlayerVehicleID(playerid);
if(VehicleInfo[vehicle][Security] == 1) {
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessageToAll(COLOR_ORANGE, "This Vehicle Owner has secured it against players drive but as admin you still can use it");
else if(strcmp(VehicleInfo[vehicle][owner],pName(playerid),false) == 1) {
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z); AC_BS_SetPlayerPos(playerid,x,y,z+2);
return SendClientMessage(playerid, COLOR_BRIGHTRED, "This Vehicle Owner Has Secure it from players drive");
}
}
else if(VehicleInfo[vehicle][Security] == 2) {
if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is currently set for admin use only. It will kill anyone who is not an admin.");
else if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)) {
new string[128];
format(string, sizeof(string), "Server administration has set this %s to kill anyone who try's to drive it...R.I.P loser!",VehicleInfo[GetPlayerVehicleID(playerid)][vName]);
SendClientMessage(playerid, COLOR_ORANGE, string);
format(string,sizeof string,"%s just tried to steal an admin only %s and was killed by the security system...R.I.P loser!",pName(playerid));
SendClientMessageToAll(COLOR_ORANGE, string);
AC_BS_SetPlayerHealth(playerid, 0.00);
return AC_BS_SetPlayerArmour(playerid, 0.00); // line warning ( line:89088)
}
}
if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) {
return GameTextForPlayer(playerid, "This vehicle is only temporary and is not for sale!", 3000, 4);
}
/*
Engine System Disabled
new vehicleid = GetPlayerVehicleID(playerid), engine, lights1, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights1, alarm, doors, bonnet, boot, objective);
if(VehicleInfo[vehicleid][owned] == 0 && engine == 0) {
SetVehicleParamsEx(vehicleid,1,lights1,alarm,doors,bonnet,boot,objective);
return VehicleInfo[vehicleid][Engine] = 1;
}
if(VehicleInfo[vehicleid][owned] == 1) SetVehicleParamsEx(vehicleid,VehicleInfo[vehicleid][Engine],lights1,alarm,doors,bonnet,boot,objective);
if(VehicleInfo[vehicleid][owned] == 1 && VehicleInfo[vehicleid][Engine] == 0)
SendClientMessage(playerid,-1,"NOTE: This Vehicle Engine Is Turned off prees N or use /engine command to turn it on!");*/
}
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(playerid); if(VehicleInfo[vehicle][Security] == 1) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessageToAll(COLOR_ORANGE, "This Vehicle Owner has secured it against players drive but as admin you still can use it"); else if(strcmp(VehicleInfo[vehicle][owner],pName(playerid),false) == 1) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); AC_BS_SetPlayerPos(playerid,x,y,z+2); return SendClientMessage(playerid, COLOR_BRIGHTRED, "This Vehicle Owner Has Secure it from players drive"); } } else if(VehicleInfo[vehicle][Security] == 2) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is currently set for admin use only. It will kill anyone who is not an admin."); else if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)) { new string[128]; format(string, sizeof(string), "Server administration has set this %s to kill anyone who try's to drive it...R.I.P loser!",VehicleInfo[GetPlayerVehicleID(playerid)][vName]); SendClientMessage(playerid, COLOR_ORANGE, string); format(string,sizeof string,"%s just tried to steal an admin only %s and was killed by the security system...R.I.P loser!",pName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AC_BS_SetPlayerHealth(playerid, 0.00); return AC_BS_SetPlayerArmour(playerid, 0.00); // line warning ( line:89088) } } if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) { return GameTextForPlayer(playerid, "This vehicle is only temporary and is not for sale!", 3000, 4); } /* Engine System Disabled new vehicleid = GetPlayerVehicleID(playerid), engine, lights1, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights1, alarm, doors, bonnet, boot, objective); if(VehicleInfo[vehicleid][owned] == 0 && engine == 0) { SetVehicleParamsEx(vehicleid,1,lights1,alarm,doors,bonnet,boot,objective); return VehicleInfo[vehicleid][Engine] = 1; } if(VehicleInfo[vehicleid][owned] == 1) SetVehicleParamsEx(vehicleid,VehicleInfo[vehicleid][Engine],lights1,alarm,doors,bonnet,boot,objective); if(VehicleInfo[vehicleid][owned] == 1 && VehicleInfo[vehicleid][Engine] == 0) SendClientMessage(playerid,-1,"NOTE: This Vehicle Engine Is Turned off prees N or use /engine command to turn it on!");*/ return 1; }
Not found return in the function.
Код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(playerid); if(VehicleInfo[vehicle][Security] == 1) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessageToAll(COLOR_ORANGE, "This Vehicle Owner has secured it against players drive but as admin you still can use it"); else if(strcmp(VehicleInfo[vehicle][owner],pName(playerid),false) == 1) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); AC_BS_SetPlayerPos(playerid,x,y,z+2); return SendClientMessage(playerid, COLOR_BRIGHTRED, "This Vehicle Owner Has Secure it from players drive"); } } else if(VehicleInfo[vehicle][Security] == 2) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is currently set for admin use only. It will kill anyone who is not an admin."); else if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)) { new string[128]; format(string, sizeof(string), "Server administration has set this %s to kill anyone who try's to drive it...R.I.P loser!",VehicleInfo[GetPlayerVehicleID(playerid)][vName]); SendClientMessage(playerid, COLOR_ORANGE, string); format(string,sizeof string,"%s just tried to steal an admin only %s and was killed by the security system...R.I.P loser!",pName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AC_BS_SetPlayerHealth(playerid, 0.00); return AC_BS_SetPlayerArmour(playerid, 0.00); // line warning ( line:89088) } } if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) { return GameTextForPlayer(playerid, "This vehicle is only temporary and is not for sale!", 3000, 4); } /* Engine System Disabled new vehicleid = GetPlayerVehicleID(playerid), engine, lights1, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights1, alarm, doors, bonnet, boot, objective); if(VehicleInfo[vehicleid][owned] == 0 && engine == 0) { SetVehicleParamsEx(vehicleid,1,lights1,alarm,doors,bonnet,boot,objective); return VehicleInfo[vehicleid][Engine] = 1; } if(VehicleInfo[vehicleid][owned] == 1) SetVehicleParamsEx(vehicleid,VehicleInfo[vehicleid][Engine],lights1,alarm,doors,bonnet,boot,objective); if(VehicleInfo[vehicleid][owned] == 1 && VehicleInfo[vehicleid][Engine] == 0) SendClientMessage(playerid,-1,"NOTE: This Vehicle Engine Is Turned off prees N or use /engine command to turn it on!");*/ return 1; } |
That should teach you and him for copying-pasting solutions... It is a return error, and it could be further up in the statement, but seriously, fix your code, and stop relying on others to copy-paste you solutions.
Why is it NO-ONE even TRIES to fix their own issues, especially with such low grade compiler errors... You'll also want to look at the actual function as well, rather than where it is called. in AC_BS_SetPlayerArmour. |
I compiled your script and the problem is the stock AC_BS_SetPlayerArmour.
return integer and float. |
ot found return in the function. Code: if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(playerid); if(VehicleInfo[vehicle][Security] == 1) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessageToAll(COLOR_ORANGE, "This Vehicle Owner has secured it against players drive but as admin you still can use it"); else if(strcmp(VehicleInfo[vehicle][owner],pName(playerid),false) == 1) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); AC_BS_SetPlayerPos(playerid,x,y,z+2); return SendClientMessage(playerid, COLOR_BRIGHTRED, "This Vehicle Owner Has Secure it from players drive"); } } else if(VehicleInfo[vehicle][Security] == 2) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is currently set for admin use only. It will kill anyone who is not an admin."); else if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)) { new string[128]; format(string, sizeof(string), "Server administration has set this %s to kill anyone who try's to drive it...R.I.P loser!",VehicleInfo[GetPlayerVehicleID(playerid)][vName]); SendClientMessage(playerid, COLOR_ORANGE, string); format(string,sizeof string,"%s just tried to steal an admin only %s and was killed by the security system...R.I.P loser!",pName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AC_BS_SetPlayerHealth(playerid, 0.00); return AC_BS_SetPlayerArmour(playerid, 0.00); // line warning ( line:89088) } } if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) { return GameTextForPlayer(playerid, "This vehicle is only temporary and is not for sale!", 3000, 4); } /* Engine System Disabled new vehicleid = GetPlayerVehicleID(playerid), engine, lights1, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights1, alarm, doors, bonnet, boot, objective); if(VehicleInfo[vehicleid][owned] == 0 && engine == 0) { SetVehicleParamsEx(vehicleid,1,lights1,alarm,doors,bonnet,boot,objective); return VehicleInfo[vehicleid][Engine] = 1; } if(VehicleInfo[vehicleid][owned] == 1) SetVehicleParamsEx(vehicleid,VehicleInfo[vehicleid][Engine],lights1,alarm,doors,bonnet,boot,objective); if(VehicleInfo[vehicleid][owned] == 1 && VehicleInfo[vehicleid][Engine] == 0) SendClientMessage(playerid,-1,"NOTE: This Vehicle Engine Is Turned off prees N or use /engine command to turn it on!");*/ }
Sorry.
Add a return in the function AC_BS_SetPlayerArmour Use this (i remove the return of this function): Код:
ot found return in the function. Code: if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(playerid); if(VehicleInfo[vehicle][Security] == 1) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessageToAll(COLOR_ORANGE, "This Vehicle Owner has secured it against players drive but as admin you still can use it"); else if(strcmp(VehicleInfo[vehicle][owner],pName(playerid),false) == 1) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); AC_BS_SetPlayerPos(playerid,x,y,z+2); return SendClientMessage(playerid, COLOR_BRIGHTRED, "This Vehicle Owner Has Secure it from players drive"); } } else if(VehicleInfo[vehicle][Security] == 2) { if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_ORANGE, "This vehicle is currently set for admin use only. It will kill anyone who is not an admin."); else if(PlayerInfo[playerid][Level] == 0 && !IsPlayerAdmin(playerid)) { new string[128]; format(string, sizeof(string), "Server administration has set this %s to kill anyone who try's to drive it...R.I.P loser!",VehicleInfo[GetPlayerVehicleID(playerid)][vName]); SendClientMessage(playerid, COLOR_ORANGE, string); format(string,sizeof string,"%s just tried to steal an admin only %s and was killed by the security system...R.I.P loser!",pName(playerid)); SendClientMessageToAll(COLOR_ORANGE, string); AC_BS_SetPlayerHealth(playerid, 0.00); return AC_BS_SetPlayerArmour(playerid, 0.00); // line warning ( line:89088) } } if(VehicleInfo[GetPlayerVehicleID(playerid)][Temp] == 1) { return GameTextForPlayer(playerid, "This vehicle is only temporary and is not for sale!", 3000, 4); } /* Engine System Disabled new vehicleid = GetPlayerVehicleID(playerid), engine, lights1, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights1, alarm, doors, bonnet, boot, objective); if(VehicleInfo[vehicleid][owned] == 0 && engine == 0) { SetVehicleParamsEx(vehicleid,1,lights1,alarm,doors,bonnet,boot,objective); return VehicleInfo[vehicleid][Engine] = 1; } if(VehicleInfo[vehicleid][owned] == 1) SetVehicleParamsEx(vehicleid,VehicleInfo[vehicleid][Engine],lights1,alarm,doors,bonnet,boot,objective); if(VehicleInfo[vehicleid][owned] == 1 && VehicleInfo[vehicleid][Engine] == 0) SendClientMessage(playerid,-1,"NOTE: This Vehicle Engine Is Turned off prees N or use /engine command to turn it on!");*/ } |