#1

I create rank system for my server organizations see this code doesn't work

PHP код:
stock SavePlayerOrgInfo(playerid)
    {
    if (!
dini_Exists(PlayerPath(playerid)))
    {
    
dini_Create(PlayerPath(playerid));
    }
    
//dini_Set(savef,"ContactName1",ContactNames[0][playerid]);
    
dini_Set(PlayerPath(playerid),"Org",Organization[PlayerOrg[playerid]][Name]);
    
dini_Set(PlayerPath(playerid),"Rank",PlayerRank[playerid]);
    
dini_IntSet(PlayerPath(playerid),"CollectedWage",CollectedWage[playerid]);
    } 
PHP код:
stock LoadPlayerOrgInfo(playerid)
{
new 
string[45];
format(string,sizeof(string),"%s",dini_Get(PlayerP ath(playerid),"Org"));
PlayerOrg[playerid] = GetOrgID(string);
PlayerRank[playerid] = dini_Int(PlayerPath(playerid),"Rank");
CollectedWage[playerid] = dini_Int(PlayerPath(playerid), "CollectedWage");
if (
strcmp(Organization[PlayerOrg[playerid]][Leader], PlayerName(playerid),true) == && PlayerOrg[playerid] != 0)
{
PlayerLeader[playerid] = 1;

PHP код:
CMD:setrank(playeridparams[])
    {
    if (!
IsLeader(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not the leader of an organization");
    new 
IDrank;
    if (
sscanf(params"ui"IDrank)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /setrank [playerid] [rank]");
    
/*if (rank > 6) return SendClientMessage(playerid, COLOR_RED,"The maximum rank is 6");
    if (rank < 1) return SendClientMessage(playerid, COLOR_RED,"The minimum rank is 1");*/
    
if (!IsPlayerConnected(ID)) return 1;
    new 
org PlayerOrg[playerid];
    if (
PlayerOrg[ID] != org) return SendClientMessage(playeridCOLOR_RED,"That player does not belong to your organization");
    new 
string[120];
    
format(string,sizeof(string),"[FACTION]%s has given you rank: '%d'!"PlayerName(playerid), rank);
    
SendClientMessage(IDCOLOR_YELLOWstring);
    
format(string,sizeof(string),"You have given rank %d to %s"rankPlayerName(ID));
    
SendClientMessage(playeridCOLOR_YELLOWstring);
    
PlayerRank[ID] = rank;
    
SavePlayerOrgInfo(ID);
    return 
1;
    } 
and give this error when I compile see

Код:
E:\Download (1)\samp03z_svr_R1_win32 (4)\pawno\Untitled.pwn(27) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Which one is line 27?
Reply
#3

What??
Reply
#4

Open gamemode.
Then Ctrl + f
Type in 27
Send us that line
Reply
#5

I create it filterscript I doesn't copy it on gamemode
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)