15.10.2009, 22:46
Hey guys!
I get this error when i compile...
Here is the code...
If you find any error with this, plz help me!
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
Код:
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"); }