09.06.2014, 07:15
Hey all,
I got a little problem I can't fix, maybe you can help me?
I get this warning when I compile. (I know the script would still run if it's got a problem, but I hate warnings :P)
Here's that piece of script:
I got a little problem I can't fix, maybe you can help me?
I get this warning when I compile. (I know the script would still run if it's got a problem, but I hate warnings :P)
Код:
C:\Users\Gebruiker\Documents\GTA San Andreas\samp servers\Fast Hustler Roleplay V2.0\gamemodes\UGRP.pwn(63951) : warning 209: function "cmd_ammute" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Код:
CMD:ammute(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 2) { new string[128], giveplayerid; if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ammute [playerid]"); if(IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pAdmin] >= 1) { return SendClientMessageEx(playerid, COLOR_LIGHTRED, "You can't /ammute admins"); } if(PlayerInfo[giveplayerid][pAMMute] == 0) { PlayerInfo[giveplayerid][pAMMute] = 1; format(string, sizeof(string), "AdmCmd: %s was muted from using /am by %s.", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid)); Log("logs/admin.log", string); ABroadCast(COLOR_LIGHTRED,string,2); } if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "AdmCmd: %s was muted from placing /ad's by Admin.", GetPlayerNameEx(giveplayerid)); SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, string); SendClientMessageEx(giveplayerid, COLOR_LIGHTRED, "You were just muted from Advertisements [/ad] by an Admin."); } else { format(string, sizeof(string), "AdmCmd: %s was muted from using /am by %s.", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid)); SendDutyAdvisorMessage(TEAM_AZTECAS_COLOR, string); format(string, sizeof(string), "You were just muted from /am by %s.", GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_LIGHTRED, string); } SendClientMessageEx(giveplayerid, COLOR_LIGHTRED, "Remember, /am may only be used for messages when you really need an admin and may not be used for trolling, PM, and other useless things unless stated otherwise by an admin."); format(string, sizeof(string), "AdmCmd: %s was just muted from using /am due to misuse.", GetPlayerNameEx(giveplayerid)); SendClientMessageToAllEx(COLOR_LIGHTRED, string); return 1; } } } //WARNING ON THIS LINE!