SA-MP Forums Archive
Help with Simple adminitration script - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Simple adminitration script (/showthread.php?tid=129909)



Help with Simple adminitration script - security - 24.02.2010

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.


Re: Help with Simple adminitration script - Torran - 24.02.2010

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


Re: Help with Simple adminitration script - VonLeeuwen - 24.02.2010

Especially this part:

Creating And Storing Our Settings


Re: Help with Simple adminitration script - security - 24.02.2010

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.


Re: Help with Simple adminitration script - VonLeeuwen - 24.02.2010

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


Re: Help with Simple adminitration script - Torran - 24.02.2010

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


Re: Help with Simple adminitration script - VonLeeuwen - 24.02.2010

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..




Re: Help with Simple adminitration script - Torran - 24.02.2010

If you tested ingame you will see the bugs


Re: Help with Simple adminitration script - VonLeeuwen - 24.02.2010

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