adminscript errors
#1

heres my script

Код:
#include <a_samp>
#include <dini>
#include <dutils>
#pragma unused ret_memcpy
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0)&&((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid,"")))||(((%3)[(%2) + 1] == 32)&&(dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define green 0x33AA33AA
#define red 0xAA3333AA
#define yellow 0xFFFF00AA
#define lightblue 0x33CCFFAA
#define orange 0xFF9900AA
#define PlayerFile "AdminScript/Users/%s.ini"
#define SettingFile "AdminScript/Settings/MainSettings.ini"
#define CommandFile "AdminScript/Settings/Commands.ini"
enum SETTINGS_MAIN {
  POCKET_MONEY,
  JAIL_COMMANDS,
  ANNOUNCE_SECONDS,
  PASS_MIN,
  PASS_MAX
}
new gSettings[SETTINGS_MAIN];
public OnFilterScriptInit()
{
if(!fexist(SettingFile))
{
dini_Create(SettingFile);
dini_IntSet(SettingFile, "PocketMoney", 3000);
dini_IntSet(SettingFile, "JailCommands", 0);
dini_IntSet(SettingFile, "AnnounceSeconds", 3);
dini_IntSet(SettingFile, "PassMin", 3);
dini_IntSet(SettingFile, "PassMax", 15);
}
gSettings[POCKET_MONEY] = dini_Int(SettingFile, "PocketMoney");
gSettings[JAIL_COMMANDS] = dini_Int(SettingFile, "JailCommands");
gSettings[ANNOUNCE_SECONDS] = dini_Int(SettingFile, "AnnounceSeconds");
gSettings[PASS_MIN] = dini_Int(SettingFile, "PassMin");
gSettings[PASS_MAX] = dini_Int(SettingFile, "PassMax");
return 1;
}
main()
{
print("\n**************************");
print("*Admin FS by [SH]airsoft222*");
print("****************************/n");
}
enum COMMANDS_MAIN{
	AKILL,
	ANNOUNCE,
	ARMOURALL,
	BAN,
	CARHP,
	EXPLODE,
	FLIP,
	GOTO,
	GETHERE,
	GIVEARMOUR,
	GIVEHEALTH,
	GIVEWEAPON,
	GOD,
	HEALALL,
	IMITATE,
	IP,
	KICK,
	MAXAMMO,
	PING,
	SETLEVEL,
	SETWANTED,
	TBAN,
	TIME,
	WEATHER
}
new gCommands[COMMANDS_MAIN];
enum PLAYER_MAIN{
	PLAYER_NAME[MAX_PLAYER_NAME],
	PLAYER_IP[16],
	PLAYER_REGGED,
	PLAYER_PASS,
	PLAYER_LOGGED,
	PLAYER_LEVEL,
	PLAYER_WIRED,
	PLAYER_JAILED
}
new gPlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
	if(!fexist(CommandFile))
	{
			dini_Create(CommandFile);
			dini_IntSet(CommandFile, "Akill", 6);
			dini_IntSet(CommandFile, "Announce", 5);
			dini_IntSet(CommandFile, "Armourall", 3);
			dini_IntSet(CommandFile, "Ban", 9);
			dini_IntSet(CommandFile, "Carhp", 4);
			dini_IntSet(CommandFile, "Explode", 5);
			dini_IntSet(CommandFile, "Goto", 4);
			dini_IntSet(CommandFile, "Gethere", 5);
			dini_IntSet(CommandFile, "Givearmour", 6);
			dini_IntSet(CommandFile, "Givehealth", 6);
			dini_IntSet(CommandFile, "Giveweapon", 7);
			dini_IntSet(CommandFile, "God", 10);
			dini_IntSet(CommandFile, "Healall", 7);
			dini_IntSet(CommandFile, "Imitate", 8);
			dini_IntSet(CommandFile, "Ip", 2);
			dini_IntSet(CommandFile, "Kick", 7);
			dini_IntSet(CommandFile, "Maxammo", 8);
			dini_IntSet(CommandFile, "Ping", 1);
			dini_IntSet(CommandFile, "Setlevel", 10);
			dini_IntSet(CommandFile, "Setwanted", 6);
			dini_IntSet(CommandFile, "Tban", 9);
			dini_IntSet(CommandFile, "Time", 3);
			dini_IntSet(CommandFile, "Weather", 3);
    }

		gCommands[AKILL] = dini_Int(CommandFile, "Akill");
		gCommands[ANNOUNCE] = dini_Int(CommandFile, "Announce");
		gCommands[ARMOURALL] = dini_Int(CommandFile, "Armourall");
		gCommands[BAN] = dini_Int(CommandFile, "Ban");
		gCommands[CARHP] = dini_Int(CommandFile, "Carhp");
		gCommands[EXPLODE] = dini_Int(CommandFile, "Explode");
		gCommands[GOTO] = dini_Int(CommandFile, "Goto");
		gCommands[GETHERE] = dini_Int(CommandFile, "Gethere");
		gCommands[GIVEARMOUR] = dini_Int(CommandFile, "Givearmour");
		gCommands[GIVEHEALTH] = dini_Int(CommandFile, "Givehealth");
		gCommands[GIVEWEAPON] = dini_Int(CommandFile, "Giveweapon");
		gCommands[GOD] = dini_Int(CommandFile, "God");
		gCommands[HEALALL] = dini_Int(CommandFile, "Healall");
		gCommands[IMITATE] = dini_Int(CommandFile, "Imitate");
		gCommands[IP] = dini_Int(CommandFile, "Ip");
		gCommands[KICK] = dini_Int(CommandFile, "Kick");
		gCommands[MAXAMMO] = dini_Int(CommandFile, "Maxammo");
		gCommands[SETLEVEL] = dini_Int(CommandFile, "Setlevel");
		gCommands[SETWANTED] = dini_Int(CommandFile, "Setwanted");
		gCommands[TBAN] = dini_Int(CommandFile, "Tban");
		gCommands[TIME] = dini_Int(CommandFile, "Time");
		gCommands[WEATHER] = dini_Int(CommandFile, "Weather");
		return 1;
}
public OnPlayerConnect(playerid)
 {
    new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
    if(!dini_Exists(file)) {
        dini_Create(file);
        dini_Set(file,"Name",Name);
        dini_Set(file,"Ip",Ip);
        dini_IntSet(file,"Registered",-1);
        dini_IntSet(file,"Password",0);
        dini_IntSet(file,"Level",0);
        dini_IntSet(file,"Wired",0);
        dini_IntSet(file,"Jailed",0);
        SendClientMessage(playerid,orange,"Your username is not recognized, Please /register to continue.");
		}
		strcat(gPlayerInfo[playerid][PLAYER_NAME], dini_Get(file,"Name"));
		strcat(gPlayerInfo[playerid][PLAYER_IP], dini_Get(file,"Ip"));
		gPlayerInfo[playerid][PLAYER_REGGED] = dini_Int(file,"Registered");
		gPlayerInfo[playerid][PLAYER_PASS] = dini_Int(file,"Password");
		gPlayerInfo[playerid][PLAYER_LEVEL] = dini_Int(file,"Level");
		gPlayerInfo[playerid][PLAYER_WIRED] = dini_Int(file,"Wired");
		gPlayerInfo[playerid][PLAYER_JAILED] = dini_Int(file,"Jailed");
		if(gPlayerInfo[playerid][PLAYER_REGGED] == 0) SendClientMessage(playerid,orange,"Your username is not recognized, please /register to continue.");
		else if(gPlayerInfo[playerid][PLAYER_REGGED] == 1) SendClientMessage(playerid,orange,"Your username is recognized, please /login to continue.");
		gPlayerInfo[playerid][PLAYER_REGGED] = 0;
		return 1;
 }
public OnPlayerDisconnect(playerid,reason)
{
		new file[180];
		format(file,sizeof(file),PlayerFile,gPlayerInfo[playerid][PLAYER_NAME]);
		dini_Set(file,"Name",gPlayerInfo[playerid][PLAYER_NAME]);
		dini_Set(file,"Ip",gPlayerInfo[playerid][PLAYER_NAME]);
		dini_IntSet(file,"Registered",gPlayerInfo[playerid][PLAYER_REGGED]);
		dini_IntSet(file,"Password",gPlayerInfo[playerid][PLAYER_PASS]);
		dini_IntSet(file,"Level",gPlayerInfo[playerid][PLAYER_LEVEL]);
		dini_IntSet(file,"Wired",gPlayerInfo[playerid][PLAYER_WIRED]);
		dini_IntSet(file,"Jailed",gPlayerInfo[playerid][PLAYER_JAILED]);
		gPlayerInfo[playerid][PLAYER_NAME] = 0;
		gPlayerInfo[playerid][PLAYER_IP] = 0;
		gPlayerInfo[playerid][PLAYER_REGGED] = 0;
		gPlayerInfo[playerid][PLAYER_LOGGED] = 0;
		gPlayerInfo[playerid][PLAYER_PASS] = 0;
		gPlayerInfo[playerid][PLAYER_LEVEL] = 0;
		gPlayerInfo[playerid][PLAYER_WIRED] = 0;
		gPlayerInfo[playerid][PLAYER_JAILED] = 0;
		return 1;
}
heres the errors

Код:
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(86) : error 010: invalid function or declaration
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(88) : error 021: symbol already defined: "dini_Create"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(89) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(90) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(91) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(92) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(93) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(94) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(95) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(96) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(97) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(98) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(99) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(100) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(101) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(102) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(103) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(104) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(105) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(106) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(107) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(108) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(109) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(110) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(111) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Chandler\Desktop\Samp Server\filterscripts\adminfilterscript.pwn(114) : error 010: invalid function or declaration

help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)