Help 1 warning....
#1

hey how can i fix this warning thanxz if u can help

C:\Users\eblood1\Desktop\Extreme Stunting\filterscripts\LuxAdmin.pwn(7405) : warning 209: function "dcmd_war" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

put a
Код:
return 1;
at the end of ur cmd
Reply
#3

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
put a
Код:
return 1;
at the end of ur cmd
i have that there already
Reply
#4

Quote:
Originally Posted by eblood1
Посмотреть сообщение
i have that there already
maybe show us the cmd.
Reply
#5

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
put a
Код:
return 1;
at the end of ur cmd
Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
maybe show us the cmd.
mhmh ok

dcmd_war(playerid,params[])
{
#pragma unused params
InCar[playerid] = 0;
DestroyVehicle(GetPlayerVehicleID(playerid));
ShowPlayerMarkers(0);
ResetPlayerWeapons(playerid);
WAR[playerid] = 1;
new PlayerName[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,PlayerName,sizeof PlayerName);
format(string,sizeof(string),"Deathmatch: %s has teleported to War Deathmatch /war.",PlayerName);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
SetPlayerInterior(playerid,1);
switch (random(10))
{
case 0:SetPlayerPos(playerid,2953.24, -2027.89, 793.05),SetPlayerFacingAngle(playerid,79.5696);
case 1:SetPlayerPos(playerid,2936.46, -2037.05, 802.90),SetPlayerFacingAngle(playerid,20.6624);
case 2:SetPlayerPos(playerid,2923.61, -2033.20, 800.25),SetPlayerFacingAngle(playerid,6.2489);
case 3:SetPlayerPos(playerid,2914.41, -2021.52, 800.57),SetPlayerFacingAngle(playerid,159.7603);
case 4:SetPlayerPos(playerid,2882.11, -2029.60, 800.05),SetPlayerFacingAngle(playerid,274.4179);
case 5:SetPlayerPos(playerid,2910.66, -2037.35, 799.71),SetPlayerFacingAngle(playerid,308.8849);
case 6:SetPlayerPos(playerid,2911.08, -2013.38, 805.46),SetPlayerFacingAngle(playerid,88.7952);
case 7:SetPlayerPos(playerid,2928.80, -1990.31, 799.23),SetPlayerFacingAngle(playerid,131.3622);
case 8:SetPlayerPos(playerid,2908.83, -1996.29, 800.24),SetPlayerFacingAngle(playerid,136.0622);
case 9:SetPlayerPos(playerid,2886.88, -1982.58, 799.23),SetPlayerFacingAngle(playerid,182.7260);
case 10:SetPlayerPos(playerid,2944.62, -2053.91, 798.75),SetPlayerFacingAngle(playerid,182.7260);
case 11:SetPlayerPos(playerid,2954.52, -1989.99, 798.09),SetPlayerFacingAngle(playerid,182.7260);
}
SendClientMessageToAll(orange,string);
SendClientMessage(playerid,GREEN,"You have entered War Deathmatch use /leave to leave.");
if(WAR[playerid] == 1)
return 1;
}
Reply
#6

Did you put "dcmd(war, 3 cmdtext);" under OnPlayerCommandText ?
Reply
#7

Quote:
Originally Posted by .:Kaos:.
Посмотреть сообщение
Did you put "dcmd(war, 3 cmdtext);" under OnPlayerCommandText ?
yea i did it like this dcmd(war,3,cmdtext);
Reply
#8

You're putting return 1; after an unclosed if statement, thus resulting in a warning.
Reply
#9

Quote:
Originally Posted by Norn
Посмотреть сообщение
You're putting return 1; after an unclosed if statement, thus resulting in a warning.
mhmh
Reply
#10

To fix it, remove:
pawn Код:
if(WAR[playerid] == 1)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)