#1

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");
Reply
#2

Search for:
PHP код:
new gSettings
found it and see what added
PHP код:
[here]; 
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.
Reply
#3

i dont have "new gSettings["
In my gamemode
Reply
#4

then how it load gSettings?
can u post the full code on pastbien?
Reply
#5

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(playeridpamesizeof(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;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)