Creating A Simple Administration FilterScript Solved
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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

Can you past your whole script on PasteBin?

So we can look what's wrong.
Reply
#6

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 :
Reply
#7

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.
Reply
#8

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.
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)