#1

hey guys why i get this error

Код HTML:
C:\Users\StR\Desktop\Scripting\Server-In-Lucru\gamemodes\server.pwn(36172) : warning 209: function "cmd_stopwar" should return a value
C:\Users\StR\Desktop\Scripting\Server-In-Lucru\gamemodes\server.pwn(36173) : error 010: invalid function or declaration
at this cmd

Код HTML:
CMD:stopwar(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login pin.");
	if(EstiFondator(playerid)) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to be the Founder of this server.");
    if(IsPlayerConnected(playerid))
	{
		new attackers = WarInfo[playerid][wAttacker],
			defenders = WarInfo[playerid][wFaction],
			warid,
			var100[500],
			string[1000];
		WarInfo[playerid][wTime] = 0;
		WarInfo[playerid][wFaction] = 0;
		WarInfo[playerid][wAttacker] = 0;
	    WarScoreF[defenders][playerid] = 0;
		WarScoreF[attackers][playerid] = 0;
		InWar[attackers] = 0;
		InWar[defenders] = 0;
		waitwar[attackers] = 60;
		waitwar[defenders] = 60;
		worstscoreat[playerid] = 0;
		worstmemberat[playerid] = 999;
		bestscoreat[playerid] = 0;
		bestmemberat[playerid] = 999;
		worstscoredf[playerid] = 0;
		worstmemberdf[playerid] = 999;
		bestscoredf[playerid] = 0;
		bestmemberdf[playerid] = 999;
	   	foreach(Player, j)
		{
			if((PlayerInfo[j][pMember] == attackers) || (PlayerInfo[j][pMember] == defenders))
			{
				SendClientMessage(j, COLOR_YELLOW, "Ai fost transferat in Virtual World-ul normal (0).");
				format(string, 256, "WAR: %s a oprit warul dintre %s si %s", attackers, defenders);
				SendFamilyMessage(attackers, COLOR_GREEN, string);
				SendFamilyMessage(defenders, COLOR_GREEN, string);
				format(string, 256, "/stopwar: %s a oprit warul dintre %s si %s", attackers, defenders);
				ABroadCast(COLOR_YELLOW,string,1);
				if(GetPlayerInterior(j) < 1)
				{
					SetPlayerVirtualWorld(j, 0);
				}
				if(attackers == 4 || defenders == 4)
				{
					for(new veh; veh < sizeof(Aztecasc); veh++)
					{
						SetVehicleVirtualWorld(Aztecasc[veh], 0);
					}
				}
				if(attackers == 5 || defenders == 5)
				{
					for(new veh; veh < sizeof(Grovec); veh++)
					{
						SetVehicleVirtualWorld(Grovec[veh], 0);
					}
				}
				if(attackers == 6 || defenders == 6)
				{
					for(new veh; veh < sizeof(Vagosc); veh++)
					{
						SetVehicleVirtualWorld(Vagosc[veh], 0);
					}
				}
				if(attackers == 10 || defenders == 10)
				{
					for(new veh; veh < sizeof(Ballasc); veh++)
					{
						SetVehicleVirtualWorld(Ballasc[veh], 0);
					}
				}
				if(attackers == 15 || defenders == 15)
				{
					for(new veh; veh < sizeof(Rifac); veh++)
					{
						SetVehicleVirtualWorld(Rifac[veh], 0);
					}
				}
				if(attackers == 16 || defenders == 16)
				{
					for(new veh; veh < sizeof(Russc); veh++)
					{
						SetVehicleVirtualWorld(Russc[veh], 0);
					}
				}
				if(PlayerInfo[j][pMember] == attackers)
				{
					GangZoneStopFlashForPlayer(j,Turfs[playerid]);
				}
				if(PlayerInfo[j][pMember] == defenders)
				{
					GangZoneStopFlashForPlayer(j,Turfs[playerid]);
				}
				mysql_format(SQL, var100, sizeof(var100),"INSERT INTO `warlogs` (`PlayerID`,`WarID`,`Kills`,`Deaths`,`Faction`) VALUES ('%d','%d','%d','%d','%d')",PlayerInfo[j][pSQLID],warid,ucideri[j][playerid],decese[j][playerid],PlayerInfo[j][pMember]);
				mysql_tquery(SQL,var100,"","");
				ucideri[j][playerid] = 0;
				decese[j][playerid] = 0;
				}
			}
		}
	}
	return 1;
}
EDIT SOLVED:

THIS:

Код HTML:
mysql_format(SQL, var100, sizeof(var100),"INSERT INTO `warlogs` (`PlayerID`,`WarID`,`Kills`,`Deaths`,`Faction`) VALUES ('%d','%d','%d','%d','%d')",PlayerInfo[j][pSQLID],warid,ucideri[j][playerid],decese[j][playerid],PlayerInfo[j][pMember]);
				mysql_tquery(SQL,var100,"","");
				ucideri[j][playerid] = 0;
				decese[j][playerid] = 0;
				}
should look like this:

Код HTML:
mysql_format(SQL, var100, sizeof(var100),"INSERT INTO `warlogs` (`PlayerID`,`WarID`,`Kills`,`Deaths`,`Faction`) VALUES ('%d','%d','%d','%d','%d')",PlayerInfo[j][pSQLID],warid,ucideri[j][playerid],decese[j][playerid],PlayerInfo[j][pMember]);
				mysql_tquery(SQL,var100,"","");
				ucideri[j][playerid] = 0;
				decese[j][playerid] = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)