[HELP] Error samp server scriptfiles -
jorambo - 24.06.2010
Heey guys, I got a question.
I am making myself an adminscript and I am busy with the /register and /login command and a scriptfile map
This is what I have:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <dini>
#include <dutils>
#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 COLOUR_GREEN 0x33AA33AA
#define COLOUR_RED 0xAA3333AA
#define COLOUR_YELLOW 0xFFFF00AA
#define COLOUR_LIGHTBLUE 0x33CCFFAA
#define COLOUR_ORANGE 0xFF9900AA
#define PlayerFile "AdminScript/Users/%s.ini"
#define SettingFile "AdminScript/Settings/MainSettings.ini"
#define CommandFile "AdminScript/Settings/Commands.ini"
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Admin Filterscript by Jorambo ");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
enum PLAYER_MAIN {
PLAYER_NAME[MAX_PLAYER_NAME],
PLAYER_IP[16],
PLAYER_REGGED,
PLAYER_PASS,
PLAYER_LOGGED,
PLAYER_LEVEL,
PLAYER_WIRED,
PLAYER_JAILED
}
enum SETTINGS_MAIN {
POCKET_MONEY,
JAIL_COMMANDS,
ANNOUNCE_SECONDS,
PASS_MIN,
PASS_MAX
}
new gSettings[SETTINGS_MAIN];
new gPlayerInfo[MAX_PLAYERS][PLAYER_MAIN];
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
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;
}
I have made in scriptfile map the maps like AdminScript and Users and stuff
But when I start sa-mp server it is saying:
Script[gamemodes/(nameofgamemode).amx]: Run time error 20: "Invalid index Parameter <Bad entry point>"
Someone has any idea how to fix this?
Re: [HELP] Error samp server scriptfiles -
Flashy - 24.06.2010
You are making it totally wrong.
You add things at OnGameModInit when it is a filterscript.
Move all things from OnGameModInit and OngameModExit to OnFilterscriptIni and OnFilterscriptExit.
Re: [HELP] Error samp server scriptfiles -
Hiddos - 24.06.2010
Quote:
Originally Posted by jorambo
pawn Код:
#define FILTERSCRIPT public OnGameModeInit() { // Don't use these lines if it's a filterscript BlaBlaBla. return 1; }
|
Fail. Copy everything to you OnFilterScriptInit section.