Why is this
#1

Hello,

Im going through a, Simple administration script tutorial,
And i tried about 10 minutes ago,
When it got to modifying my commands, The beginning of it,
It said to compile, It said i should recieve no errors or warnings, But i did,
So i tried again just now and im recieveing the same errors and warnings as the last time i tried on the same bit,
Why is this?

Код:
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(34) : error 017: undefined symbol "gSettings"
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(35) : error 017: undefined symbol "gSettings"
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(36) : error 017: undefined symbol "gSettings"
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(37) : error 017: undefined symbol "gSettings"
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(38) : error 017: undefined symbol "gSettings"
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(195) : error 047: array sizes do not match, or destination array is too small
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(198) : error 047: array sizes do not match, or destination array is too small
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(226) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Im concentrating on the gSettings errors for now, Although it says Undefined symbol,
Its here

pawn Код:
enum SETTINGS_MAIN {
POCKET_MONEY,
JAIL_COMMANDS,
ANNOUNCE_SECONDS,
PASS_MIN,
PASS_MAX
}
new gSettings[SETTINGS_MAIN];
Can someone tell me why?
Ive done everything it said in the tutorial,
I havent done a single thing different
Reply
#2

Код:
(226) : warning 203: symbol is never used: "ret_memcpy"
That warning comes with the dutils.inc
To fix, easily put under includes:
pawn Код:
#pragma unused ret_memcpy
To fix the rest, I believe you have one or more braces less than you should have, try looking for it.
You could also try:
pawn Код:
enum SETTINGS_MAIN
{
    POCKET_MONEY,
    JAIL_COMMANDS,
    ANNOUNCE_SECONDS,
    PASS_MIN,
    PASS_MAX
}; //added ;  not necaserry, but it could work now
new gSettings[SETTINGS_MAIN];
Good luck
Reply
#3

Still the same
Reply
#4

Sorry for double post.

But i really need to fix
Reply
#5

Show us the included lines for errors
Reply
#6

I will solve your problems, but remember to use "Search" next time. I had the same problems and I solved them using it .

1st: As lrZ^ aka LarzI told you, add
Код:
#pragma unused ret_memcpy
to the top of the script to solve that warning:
Код:
(226) : warning 203: symbol is never used: "ret_memcpy"
2nd: For the 5 gSettings errors move
Код:
enum SETTINGS_MAIN {
POCKET_MONEY,
JAIL_COMMANDS,
ANNOUNCE_SECONDS,
PASS_MIN,
PASS_MAX
}
new gSettings[SETTINGS_MAIN];
above
Код:
public OnFilterScriptInit()
So it will look like:
Код:
......enum SETTINGS_MAIN
{
  POCKET_MONEY,
  JAIL_COMMANDS,
  ANNOUNCE_SECONDS,
  PASS_MIN,
  PASS_MAX
}
new gSettings[SETTINGS_MAIN];

public OnFilterScriptInit()
  {
 	print("\n*******************");
	print("* Admin Panel v0.0*");
	print("*******************\n");
	
  if(!fexist(SettingFile))
	{......
3rd: For the other 2 errors
Код:
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(195) : error 047: array sizes do not match, or destination array is too small
C:\Users\Torran\Documents\Server\filterscripts\admin.pwn(198) : error 047: array sizes do not match, or destination array is too small
you should change that:
Код:
	new tmp[30],
	  tmp2[30],
	  index;
with that
Код:
	new tmp[256],
	  tmp2[256],
	  index;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)