help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help (
/showthread.php?tid=586391)
help -
Trollerz - 21.08.2015
Help meee..
Error:-
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\filterscripts\adminsys.pwn(34) : error 017: undefined symbol "POCKET_MONEY"
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\filterscripts\adminsys.pwn(34) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\AHAD AMAN SAMP WORK\filterscripts\adminsys.pwn(34) : fatal error 107: too many error messages on one line
Код:
public OnFilterScriptInit()
{
print("\n****************************************");
print("* Admin Filterscript by your name here *");
print("****************************************\n");
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"); //Main error line
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");
Re: help -
jlalt - 21.08.2015
Search for:
found it and see what added
then search for:
PHP код:
enum what added there
{
...
...
.
.
.
.
.
// add POCKET_MONEY
NOTE: If you wana add POCKET_MONEY befor last enum add it as [POCKET_MONEY, if want it last one add it as POCKET_MONEY
}
enjoy.
Re: help -
Trollerz - 21.08.2015
i dont have "new gSettings["
In my gamemode
Re: help -
jlalt - 21.08.2015
then how it load gSettings?
can u post the full code on pastbien?
Re: help -
jlalt - 22.08.2015
hope this work:
PHP код:
#include a_samp
#include Dini
#include dudb
enum ginfo
{
POCKET_MONEY,
JAIL_COMMANDS,
ANNOUNCE_SECONDS,
PASS_MIN,
PASS_MAX
}
new gSettings[ginfo];
public OnFilterScriptInit()
{
print("\n****************************************");
print("* Admin Filterscript by your name here *");
print("****************************************\n");
new playerid;
new pame[MAX_PLAYER_NAME];
GetPlayerName(playerid, pame, sizeof(pame));
new SettingFile[256]; format(SettingFile,sizeof(SettingFile),"save/%s.sav",udb_encode(pame));
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"); //Main error line
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;
}