Several errors on 1 line
#1

Hello guys,

I'm having 4 errors on 1 line.

The line:
PHP код:
f(fexist(Path(playerid))) 
The errors:

Quote:

error 001: expected token: "-string end-", but found "-identifier-"
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Anyone please?
Reply
#2

Could you show me the line before that? Just to make sure, the right keyword is 'if' and not just 'f', but I'm sure it's just a copy-paste fail.
Reply
#3

Also make sure the few lines above it aren't missing a ; at the end.
Reply
#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
#5

And the Path function?

EDIT: You've got a define named 'Path', change that to something else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)