SA-MP Forums Archive
Creating A Simple Administration FilterScript Solved - 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: Creating A Simple Administration FilterScript Solved (/showthread.php?tid=83218)



Creating A Simple Administration FilterScript Solved - GTA967 - 23.06.2009

im trying the the tutorial on Creating A Simple Administration FilterScript on https://sampwiki.blast.hk/wiki/Creating_...n_FilterScript i get up to the Creating And Storing Our Settings the tutoril say i should have no errors or warnigs but i get this
Код:
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(35) : error 017: undefined symbol "gSettings"
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(36) : error 017: undefined symbol "gSettings"
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(37) : error 017: undefined symbol "gSettings"
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(38) : error 017: undefined symbol "gSettings"
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(39) : error 017: undefined symbol "gSettings"
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(197) : error 047: array sizes do not match, or destination array is too small
F:\Samp Server\Server EPG\Admin Filter Script\1.pwn(200) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
iv been trying to learn to script for about 2 days now plaese help a nub out


This problem has been solved by a master scripter Blacklite his solution(the array sizes need to be 256 since your using strtok) thank you Blacklite <4 ...btw <4 is the new <3


Re: Creating A Simple Administration FilterScript (help Me Please) - member - 23.06.2009

Under this heading: Creating And Storing Our Settings
https://sampwiki.blast.hk/wiki/Creating_...g_Our_Settings

did u add:
pawn Код:
enum SETTINGS_MAIN {
  POCKET_MONEY,
  JAIL_COMMANDS,
  ANNOUNCE_SECONDS,
  PASS_MIN,
  PASS_MAX
}
 
new gSettings[SETTINGS_MAIN]; //This?
Maybe you forgot to put new gSettings[SETTINGS_MAIN]; in your script.


Re: Creating A Simple Administration FilterScript (help Me Please) - GTA967 - 23.06.2009

thanks for the reply but yea its there but i looked at it for a 10th time and noticed that i had put the code in the wrong place i put it in the right place but i still get the folloing errors/warings
Код:
F:\Samp Server\Server EPG\Admin Filter Script\1 before enum placement2.pwn(182) : error 047: array sizes do not match, or destination array is too small
F:\Samp Server\Server EPG\Admin Filter Script\1 before enum placement2.pwn(185) : error 047: array sizes do not match, or destination array is too small
F:\Samp Server\Server EPG\Admin Filter Script\1 before enum placement2.pwn(208) : warning 203: symbol is never used: "gSettings"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Creating A Simple Administration FilterScript (help Me Please) - [03]Garsino - 23.06.2009

i am aslo having this problem does anyone have a solution?


Re: Creating A Simple Administration FilterScript (help Me Please) - pascallj - 23.06.2009

Can you past your whole script on PasteBin?

So we can look what's wrong.


Re: Creating A Simple Administration FilterScript (help Me Please) - GTA967 - 23.06.2009

yes here it is http://pawn.pastebin.com/m62d9cbab when you see it just remeber (i am a nub) please tell me what i have done wrong :


Re: Creating A Simple Administration FilterScript (help Me Please) - pascallj - 23.06.2009

Right, I don't know anything about that Dini script. But, in line 181 i see: "index;". That index doesn't have a length specified, so that is the reason for the first 2 errors, I think. Make it also like: "index[30];"

And the warning is still in line 208 but that don't you have posted on Pastebin. So I can't help you with that.


Re: Creating A Simple Administration FilterScript (help Me Please) - GTA967 - 23.06.2009

I maneged to get rid of all warnings but when i specify the index to have a lenght of 30 i get two more errors here is is what it looks like with index pecified
Код:
F:\Samp Server\Server EPG\Admin Filter Script\1 before uncomment.pwn(182) : error 035: argument type mismatch (argument 2)
F:\Samp Server\Server EPG\Admin Filter Script\1 before uncomment.pwn(182) : error 047: array sizes do not match, or destination array is too small
F:\Samp Server\Server EPG\Admin Filter Script\1 before uncomment.pwn(185) : error 035: argument type mismatch (argument 2)
F:\Samp Server\Server EPG\Admin Filter Script\1 before uncomment.pwn(185) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
without it the lenght i get
Код:
F:\Samp Server\Server EPG\Admin Filter Script\1 before uncomment.pwn(182) : error 047: array sizes do not match, or destination array is too small
F:\Samp Server\Server EPG\Admin Filter Script\1 before uncomment.pwn(185) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Creating A Simple Administration FilterScript Solved - Blacklite - 23.06.2009

strtok only supports arrays of 256 size. Anything else and it will give this warning.