[Help]Problem with DCMD_SLAP 1 ERROR
#1

Hey guys!

I get this error when i compile...
Код:
C:\Users\USER\Desktop\server\filterscripts\ladmin.pwn(2682) : warning 209: function "dcmd_slap" should return a value
C:\Users\USER\Desktop\server\filterscripts\ladmin.pwn(2682) : error 010: invalid function or declaration
Here is the code...
Код:
dcmd_slap(playerid,params[]) {
  if(PlayerInfo[playerid][LoggedIn] == 1) {
		if(PlayerInfo[playerid][Level] >= 2) {
		  new tmp[256], tmp2[256], Index;		tmp = strtok(params,Index), tmp2 = strtok(params,Index);
		  if(!strlen(params)) return SendClientMessage(playerid, orange, "USAGE: /slap [playerid] [reason]");
	  	new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
			player1 = strval(tmp);
			
			
  			new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(player1,Health);
			GetPlayerPos(player1,x,y,z); SetPlayerPos(player1,x,y,z+2); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);

			if(strlen(tmp2)) {
			GetPlayerName(player1, playername, sizeof(playername));		GetPlayerName(playerid, adminname, sizeof(adminname));
			format(string,sizeof(string),"Adminstrator %s has slapped %s (%d) for: %s",adminname,playername,playerid, params[2]); return	SendClientMessageToAll(orange,string); }
			} else {
      new player1, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
  			GetPlayerName(player1, playername, sizeof(playername));		GetPlayerName(playerid, adminname, sizeof(adminname));
			format(string,sizeof(string),"Adminstrator %s has slapped %s (%d) for [No Reason Defined]",adminname, playername, playerid); return 	SendClientMessageToAll(orange,string); }
		} else return SendClientMessage(playerid,orange,"ERROR: You are not a high enough level to use this command");
	} else return SendClientMessage(playerid, orange, "ERROR: You must be logged in to use this command");
}
If you find any error with this, plz help me!
Reply


Messages In This Thread
[Help]Problem with DCMD_SLAP 1 ERROR - by Tigerbeast11 - 15.10.2009, 22:46
Re: [Help]Problem with DCMD_SLAP 1 ERROR - by [mad]MLK - 15.10.2009, 22:52
Re: [Help]Problem with DCMD_SLAP 1 ERROR - by Tigerbeast11 - 15.10.2009, 22:54
Re: [Help]Problem with DCMD_SLAP 1 ERROR - by _Vortex - 15.10.2009, 23:16
Re: [Help]Problem with DCMD_SLAP 1 ERROR - by Tigerbeast11 - 15.10.2009, 23:18

Forum Jump:


Users browsing this thread: 1 Guest(s)