29.04.2012, 19:03
Hey, I want to change a little bit a RP server and I just tried to add the command /setrank from this theard: https://sampforum.blast.hk/showthread.php?tid=84012
I got few errors
I need to know where can I find the [pFactions] of my mod, and all the errors
Thanks for helpers
Код:
if(strcmp(cmd, "/setrank", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USAGE:] /setrank [playerid/partofname] [newrank]"); return 1; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); level = strval(tmp); if (PlayerInfo[playerid][pRank] == 1 && PlayerInfo[playerid][pFaction] != 255) { if (PlayerInfo[para1][pFaction] == PlayerInfo[playerid][pFaction]) { new faction = PlayerInfo[playerid][pFaction]; if (level) { if(level > 1 && level <= DynamicFactions[faction][fRankAmount]) { if(IsPlayerConnected(para1)) { if(gPlayerLogged[para1]) { if(para1 != INVALID_PLAYER_ID) { PlayerInfo[para1][pRank] = level; format(string, sizeof(string), "[INFO:] You rank has been changed by: %s, you are now rank: %d.", GetPlayerNameEx(playerid),level); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "[INFO:] You have changed %s's rank to: %d.", GetPlayerNameEx(para1),level); SendClientMessage(playerid, COLOR_YELLOW, string); SetPlayerToFactionSkin(para1); if(PlayerInfo[para1][pSex] == 1) { format(string, sizeof(string), "[FACTION:] %s's rank has been changed, he is now rank: %d.",GetPlayerNameEx(para1), level); SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_FACTIONCHAT, string); } else { format(string, sizeof(string), "[FACTION:] %s's rank has been changed, she is now rank: %d.",GetPlayerNameEx(para1), level); SendFactionMessage(PlayerInfo[playerid][pFaction], COLOR_FACTIONCHAT, string); } } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] That players not logged in!"); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Invalid ID/Player Not Connected."); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] Rank must be below or equal to the factions rank amount."); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You must enter an amount!"); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] The person who's rank you tried to edit is not a member of your faction."); } } else { SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You are not a leader."); } } return 1; }
Код:
C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26826) : error 017: undefined symbol "pFaction" C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26828) : error 017: undefined symbol "pFaction" C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26830) : error 017: undefined symbol "pFaction" C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26833) : error 017: undefined symbol "DynamicFactions" C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26833) : warning 215: expression has no effect C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26833) : error 001: expected token: ";", but found "]" C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26833) : error 029: invalid expression, assumed zero C:\Users\вйа\Desktop\LasVenturasRP2\gamemodes\LasVenturasRP.pwn(26833) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.
Thanks for helpers