Why is this -
JoeDaDude - 23.12.2009
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
Re: Why is this -
LarzI - 23.12.2009
Код:
(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
Re: Why is this -
JoeDaDude - 23.12.2009
Still the same
Re: Why is this -
JoeDaDude - 23.12.2009
Sorry for double post.
But i really need to fix
Re: Why is this -
LarzI - 23.12.2009
Show us the included lines for errors
Re: Why is this -
lefteris96 - 27.12.2009
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;