Help with Simple adminitration script
#1

I am using a tutorial from Wiki sa-mp ( https://sampwiki.blast.hk/wiki/Creating_...n_FilterScript ) but i get 4 errors


Код:
...\filterscripts\adminscript.pwn(44) : error 017: undefined symbol "gSettings"
...\filterscripts\adminscript.pwn(44) : error 017: undefined symbol "POCKET_MONEY"
...\filterscripts\adminscript.pwn(44) : error 029: invalid expression, assumed zero
...\filterscripts\adminscript.pwn(44) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
The line's:
Код:
	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");
How can i fix it, i looked on the whole tutorial.
Reply
#2

Quote:
Originally Posted by security
I am using a tutorial from Wiki sa-mp ( https://sampwiki.blast.hk/wiki/Creating_...n_FilterScript ) but i get 4 errors


Код:
...\filterscripts\adminscript.pwn(44) : error 017: undefined symbol "gSettings"
...\filterscripts\adminscript.pwn(44) : error 017: undefined symbol "POCKET_MONEY"
...\filterscripts\adminscript.pwn(44) : error 029: invalid expression, assumed zero
...\filterscripts\adminscript.pwn(44) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
The line's:
Код:
	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");
How can i fix it, i looked on the whole tutorial.
read the tutorial again but carefully and you will see where you went wrong
Reply
#3

Especially this part:

Creating And Storing Our Settings
Reply
#4

i do but i cant find the wrong think, did i put enum

Код:
SETTINGS_MAIN {
  POCKET_MONEY,
  JAIL_COMMANDS,
  ANNOUNCE_SECONDS,
  PASS_MIN,
  PASS_MAX
}

new gSettings[SETTINGS_MAIN];
etc. at the wrong place?

edit:

nvm

I now get a full list with errors if i place this under the line of settings_Main:

Код:
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];
Edit:

I uploaded the script to: http://pastebin.org/96491

I cant get those errors away.
Reply
#5

I am working on it, just a few errors to go :P
Reply
#6

To be honest with you that tutorial has bugs so you'll need to edit it alot when finished,
I used the tutorial once but it had loads of bugs
Reply
#7

http://pawn.pastebin.com/L98jLyH7

Yes it has a lot of bugs, but most/all are fixed now, or at least, script gives no errors/warnings..

Reply
#8

If you tested ingame you will see the bugs
Reply
#9

Oh lord... Well, I hope 'security' learned something from this AdminScript, and that he'll be able to make one on his own now With out help ofcourse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)