Several errors on 1 line
#4

The whole callback:

PHP код:
public OnPlayerConnect(playerid)
{
    if(
fexist(Path(playerid))) //If exist a file in "Gang" folder with player name
    
{
        
//If exist Load player gang stats and set player color of the gang in which he is.. If player
        //isn't in any of gang, he's color will be White
        
INI_ParseFile(Path(playerid), "LoadGang_%s", .bExtra true, .extra playerid);
        
SetPlayerColor(playeridG_Info[playerid][gColor]);
    }
    else 
//if player has connect first time, and a file dosen't exist
    
{
        
//Make a new file in folder "Gang" whit player name in which we will store some variables
        //We save all necesery variables of gang(Leader, Skin, Color, Rank...)
        
new INI:File INI_Open(Path(playerid));
        
INI_SetTag(File,"gang");
        
INI_WriteInt(File,"gContract",0);
        
G_Info[playerid][gCont] = 0;
        
INI_WriteInt(File,"gGang",0);
        
G_Info[playerid][gGang] = 0;
        
INI_WriteInt(File,"gLeader",0);
        
G_Info[playerid][gLeader] = 0;
        
INI_WriteInt(File,"gRank",0);
        
G_Info[playerid][gRank] = 0;
        
INI_WriteInt(File,"gColor",4294967295);
        
G_Info[playerid][gColor] = 4294967295;
          
INI_WriteInt(File,"gSkin",0);
          
G_Info[playerid][gSkin] = 0;
          
INI_WriteString(File,"gGangName","Civil");
          
GangName[playerid] = "Civil";
          
INI_WriteString(File,"gRankName","Nothing");
          
RankName[playerid] = "Nothing";
          
INI_Close(File);
          
//Close file
    
}
    return 
1;

The what is before that:
PHP код:
#include <a_samp>
#include <a_samp>
#include <YSI\y_commands> //Using it for commands
#include <YSI\y_ini> //Using it for loading/saving variables
#include <sscanf2> //Credits to ******
#include <foreach> //Loop trough players... (******)
#include <YSI\y_timers> //for timers
#define COL_VALUE "{A3E4FF}"
#define COL_LRED2 "{C77D87}"
#define COL_WHITE "{FFFFFF}"
#define COL_LGREEN "{C9FFAB}"
#define COL_ORANGE "{FFAF00}"
#define COL_RED "{F81414}"
#define COL_YELLOW "{F3FF02}"
#define COL_PINK "{FF00EA}"
#define COL_LIGHTBLUE "{00C0FF}"
#define YouAreNotAdmin(%0); \
    
SendClientMessage(%0, -1"| "#COL_RED"X::Gang "#COL_WHITE"| "#COL_GREY"You are not Admin!"); //Message that will show to player if he isn't admin when he is adding a leader to someone..
#define WrongID(%0); \
    
GangMSG(%0"ID igraca ili Ime koje ste upisali ne postoji!"); //Message that will show to player if the selected player isn't online..
#define Path "/Gang/%s.ini"
#if defined FILTERSCRIPT
enum gInfo
{
    
gGang//ID of gang
    
gLeader//ID of Leader gang (Leader of which Gang ID)
    
gCont//Contract of player in gang
    
gRank//Rank of player in Gang
    
gSkin//Skin of player in Gang
    
gColor //Color of player in Gang
}
new 
G_Info[MAX_PLAYERS][gInfo]; //Form 
Reply


Messages In This Thread
Several errors on 1 line - by aimane65 - 04.01.2016, 20:09
Re: Several errors on 1 line - by AndySedeyn - 04.01.2016, 20:12
Re: Several errors on 1 line - by kaisersouse - 04.01.2016, 20:15
Re: Several errors on 1 line - by aimane65 - 04.01.2016, 20:16
Re: Several errors on 1 line - by AndySedeyn - 04.01.2016, 20:25

Forum Jump:


Users browsing this thread: 2 Guest(s)