26.01.2018, 15:16
Direct to problem:
Errors:
on lines:
Код:
CMD:enterfaction(playerid, params[]) { new groupID; new userID = playerid; if(sscanf(params, "d", groupID)) { return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/EnterFaction [FactionID]"); } else { if(groupID < 1 || groupID > MAX_GROUPS) return SendClientMessage(playerid, COLOR_GREY, "Invalid group ID->:"); SendClientMessage(playerid, COLOR_GREY, "LSPD(1) - F.B.I(2) - National Guard(3) - Paramedic Departament(4);"); SendClientMessage(playerid, COLOR_GREY, "Guvernment(5) - The Russian Mafia(6) - Groove Street(7) - Los Aztecas(8);"); SendClientMessage(playerid, COLOR_GREY, "Ballas(9) - Los Vagos(10) - Hitman Agency(11) - School Instructors(12);"); SendClientMessage(playerid, COLOR_GREY, "Taxi Company(13) - News Reporters(14) - Las Barrancas Taxi Company(15)."); if(playerVariables[userID][pGroup] == 0) { format(szMessage, 256, "UPDATE playeraccounts set playerDays = 0 WHERE playerID = '%d'", playerVariables[userID][pInternalID]); mysql_tquery(handle,szMessage); playerVariables[userID][pGroup] = groupID; playerVariables[userID][pGroupRank] = 1; SetPlayerToTeamColor(userID); new string[256]; GetPlayerName(userID, szPlayerName, MAX_PLAYER_NAME); format(string, sizeof(string), "Ai intrat in: %s.", szPlayerName, groupVariables[groupID][gGroupName]); SendClientMessage(playerid, COLOR_WHITE, string); GetPlayerName(userID, szPlayerName, MAX_PLAYER_NAME); new query[500]; format(string, sizeof(string), "<< %s a intrat in factiunea %s. >>", szPlayerName,groupVariables[groupID][gGroupName]); format(query, sizeof(query), "INSERT INTO faction_logs (text, playerID) VALUES ('%s', '%d')", string,playerVariables[userID][pInternalID]); mysql_tquery(handle,query); format(query, sizeof(query), "INSERT INTO flogs (text, playerID, faction) VALUES ('%s', '%d', '%d')", string,playerVariables[userID][pInternalID], playerVariables[userID][pGroup]); mysql_tquery(handle,query); if(playerVariables[userID][pGroup] == 1) { SetPlayerSkin(userID, 284); playerVariables[userID][pSkin] = 284; } if(playerVariables[userID][pGroup] == 2) { SetPlayerSkin(userID, 163); playerVariables[userID][pSkin] = 163; } if(playerVariables[playerid][pGroup] == 3) { SetPlayerSkin(playerid, 287); playerVariables[playerid][pSkin] = 287; } if(playerVariables[playerid][pGroup] == 4) { SetPlayerSkin(playerid, 276); playerVariables[playerid][pSkin] = 276; } if(playerVariables[playerid][pGroup] == 5) { SetPlayerSkin(playerid, 284); playerVariables[playerid][pSkin] = 284; } if(playerVariables[playerid][pGroup] == 6) { SetPlayerSkin(playerid, 73); playerVariables[playerid][pSkin] = 73; } if(playerVariables[playerid][pGroup] == 7) { SetPlayerSkin(playerid, 106); playerVariables[playerid][pSkin] = 106; } if(playerVariables[playerid][pGroup] == 8) { SetPlayerSkin(playerid, 116); playerVariables[playerid][pSkin] = 116; } if(playerVariables[playerid][pGroup] == 9) { SetPlayerSkin(playerid, 175); playerVariables[playerid][pSkin] = 175; } if(playerVariables[playerid][pGroup] == 10) { SetPlayerSkin(playerid, 104); playerVariables[playerid][pSkin] = 104; } if(playerVariables[playerid][pGroup] == 11) { SetPlayerSkin(playerid, 110); playerVariables[playerid][pSkin] = 110; } if(playerVariables[playerid][pGroup] == 12) { SetPlayerSkin(playerid, 208); playerVariables[playerid][pSkin] = 208; } if(playerVariables[playerid][pGroup] == 13) { SetPlayerSkin(playerid, 153); playerVariables[playerid][pSkin] = 153; } if(playerVariables[playerid][pGroup] == 14) { SetPlayerSkin(playerid, 253); playerVariables[playerid][pSkin] = 253; } if(playerVariables[playerid][pGroup] == 15) { SetPlayerSkin(playerid, 188); playerVariables[playerid][pSkin] = 188; } } else return SCM(playerid, COLOR_WHITE, "Esti deja intr-o factiune [/quitgroup]!"); } } return 1; }
Код:
C:\Users\Sorin\Desktop\Bugged RPG (Version 3.3.0)\Bugged RPG (Version 3.3.0)\gamemodes\buggedv330.pwn(32445) : warning 209: function "cmd_enterfaction" should return a value C:\Users\Sorin\Desktop\Bugged RPG (Version 3.3.0)\Bugged RPG (Version 3.3.0)\gamemodes\buggedv330.pwn(32446) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Код:
playerVariables[playerid][pSkin] = 188; } } else return SCM(playerid, COLOR_WHITE, "Esti deja intr-o factiune [/quitgroup]!"); } }-----------------------< Line 32445 return 1; }