SA-MP Forums Archive
Tons of errors.. - 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: Tons of errors.. (/showthread.php?tid=95984)

Pages: 1 2


Tons of errors.. - _Vortex - 05.09.2009

Hey, I'm trying to make an admin system (built into my GM) using things from https://sampwiki.blast.hk/wiki/Creating_...n_FilterScript

I've made my enums, etc. And I'm getting errors like "Unidentified symbol -- Regged" when it is defined..

Code:
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(16) : error 001: expected token: "}", but found "-identifier-"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(617) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(625) : error 017: undefined symbol "Pass"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(626) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(627) : error 017: undefined symbol "Logged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(628) : warning 213: tag mismatch
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(628) : error 032: array index out of bounds (variable "pInfo")
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(636) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(638) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(645) : error 017: undefined symbol "Pass"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(647) : error 017: undefined symbol "Logged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(648) : warning 213: tag mismatch
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(648) : error 032: array index out of bounds (variable "pInfo")
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(694) : error 017: undefined symbol "Deaths"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(695) : error 017: undefined symbol "Kills"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : warning 213: tag mismatch
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(706) : error 035: argument type mismatch (argument 3)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(707) : error 035: argument type mismatch (argument 3)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(714) : warning 213: tag mismatch
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(714) : error 032: array index out of bounds (variable "pInfo")
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(715) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(716) : error 017: undefined symbol "Pass"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(717) : error 017: undefined symbol "Level"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(718) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(719) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(720) : error 017: undefined symbol "Regged"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : warning 204: symbol is assigned a value that is never used: "Name"
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(729) : warning 213: tag mismatch
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(729) : error 032: array index out of bounds (variable "pInfo")
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(730) : error 017: undefined symbol "Regged"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

26 Errors.
Heres a pastebin of the stuff thats' getting errors..

http://pastebin.com/f1678c6e8

Please help, I really want to have my admin system work..


Re: Tons of errors.. - Correlli - 05.09.2009

You forgot to add ,

pawn Code:
enum PlayerInfo {
  Name,
  IP[16], // Line 16
  Pass,
  Level,
  Regged,
  Logged,
  Money,
  Kills,
  Deaths,
};



Re: Tons of errors.. - Burridge - 05.09.2009

Don, don't add the , on the last one (Deaths), that causes errors.

Should be like this:

pawn Code:
enum PlayerInfo {
  Name,
  IP[16], // Line 16
  Pass,
  Level,
  Regged,
  Logged,
  Money,
  Kills,
  Deaths
};



Re: Tons of errors.. - Correlli - 05.09.2009

Quote:
Originally Posted by Burridge
Don, don't add the , on the last one (Deaths), that causes errors.
No, it doesn't.


Re: Tons of errors.. - Burridge - 05.09.2009

Quote:
Originally Posted by Don Correlli
No, it doesn't.
o.o

Does for me, every time i've done that in the past.


Re: Tons of errors.. - Correlli - 05.09.2009

If you do something like this:
pawn Code:
enum InfoVariables
{
  var1,
  var2,
  var3,
};
it will compile without errors,
but if you do something like this:
pawn Code:
new RANDOM_NAME[3][0] =
{
{"name1"},
{"name2"},
{"name3"},
};
it will cause error 018: initialization data exceeds declared size.
So it needs to be like this:
pawn Code:
new RANDOM_NAME[3][0] =
{
{"name1"},
{"name2"},
{"name3"}
};
Maybe you have switched these two in your mind?


Re: Tons of errors.. - Burridge - 05.09.2009

[me=Burridge]facepalms[/me]

OF COURSE! Hurp Durp! -.-'

Wow, i'm having a stupid moment today, horrid illness. -.-'

I feel silly now. xD


Re: Tons of errors.. - _Vortex - 05.09.2009

Thanks guys! but now I have these errors:

Code:
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : warning 213: tag mismatch
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(706) : error 035: argument type mismatch (argument 3)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(707) : error 091: ambiguous constant; tag override is required (symbol "IP")
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(703) : warning 204: symbol is assigned a value that is never used: "Name"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase



Re: Tons of errors.. - Correlli - 05.09.2009

Please post the updated code, it's easier to work with it.


Re: Tons of errors.. - Burridge - 05.09.2009

EDIT:

Disregard this post, my internet is lagging. -.-'


Re: Tons of errors.. - _Vortex - 05.09.2009

Quote:
Originally Posted by Don Correlli
Please post the updated code, it's easier to work with it.
http://pastebin.com/f688637fd

Thanks for all your help


Re: Tons of errors.. - Correlli - 05.09.2009

It would be also good if you post lines 706 and 707.
And about the "Name" warning/error: the local and global variable names are the same, change one of them.


Re: Tons of errors.. - _Vortex - 05.09.2009

Quote:
Originally Posted by Don Correlli
It would be also good if you post lines 706 and 707.
And about the "Name" warning/error: the local and global variable names are the same, change one of them.
Lines 706 and 707 are there. And what are local and global variables?


Re: Tons of errors.. - Correlli - 05.09.2009

Quote:
Originally Posted by [B
Vortex ]
Lines 706 and 707 are there.
I mean which one is exactly 706 and 707. Sorry, didn't saw the // 706 and // 703 comments.

Quote:
Originally Posted by [B
Vortex ]
And what are local and global variables?
You have the Name variable at PlayerInfo and again, you have Name variable at the OnPlayerConnectSettings function.
The one at PlayerInfo is global and the one at OnPlayerConnectSettings is local, their names are the same, change one of them.

Also:
pawn Код:
dini_Set(file,"IP",IP);
should be:
pawn Код:
dini_Set(file,"IP",Ip);
because you have stored player's ip into the "Ip" variable, not "IP".


Re: Tons of errors.. - _Vortex - 05.09.2009

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by [B
Vortex ]
Lines 706 and 707 are there.
I mean which one is exactly 706 and 707. Sorry, didn't saw the // 706 and // 703 comments.

Quote:
Originally Posted by [B
Vortex ]
And what are local and global variables?
You have the Name variable at PlayerInfo and again, you have Name variable at the OnPlayerConnectSettings function.
The one at PlayerInfo is global and the one at OnPlayerConnectSettings is local, their names are the same, change one of them.

Also:
pawn Код:
dini_Set(file,"IP",IP);
should be:
pawn Код:
dini_Set(file,"IP",Ip);
because you have stored player's ip into the "Ip" variable, not "IP".
Thanks, but now..

Код:
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(705) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(705) : warning 219: local variable "Ip" shadows a variable at a preceding level
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(705) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(705) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(705) : error 035: argument type mismatch (argument 2)
C:\Users\Damien\Desktop\samp server\gamemodes\LVTDMFIX.pwn(705) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Line 705 -
pawn Код:
new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);



Re: Tons of errors.. - Correlli - 05.09.2009

Quote:
Originally Posted by [B
Vortex ]
pawn Код:
format(file,sizeof(file),PlayerFile,Name);
And the PlayerFile? How is that defined?


Re: Tons of errors.. - _Vortex - 05.09.2009

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by [B
Vortex ]
pawn Код:
format(file,sizeof(file),PlayerFile,Name);
And the PlayerFile? How is that defined?
pawn Код:
#define PlayerFile              "AdminScript/Users/%s.ini"



Re: Tons of errors.. - Correlli - 06.09.2009

The define is fine.
I think the problem is here:
pawn Код:
format(file,sizeof(file),PlayerFile,Name);
You had two "Name" variables, one at PlayerInfo enum and other at OnPlayerConnectSettings, did you changed the name of the one like i told you before?


Re: Tons of errors.. - _Vortex - 06.09.2009

Quote:
Originally Posted by Don Correlli
The define is fine.
I think the problem is here:
pawn Код:
format(file,sizeof(file),PlayerFile,Name);
You had two "Name" variables, one at PlayerInfo enum and other at OnPlayerConnectSettings, did you changed the name of the one like i told you before?
I'm not quite sure what to edit or what to edit it too


Re: Tons of errors.. - Correlli - 06.09.2009

Change one of the variables.

Example:
pawn Код:
enum PlayerInfo {
  Name,
  ...
};
to:

pawn Код:
enum PlayerInfo {
  gName,
  ...
};
and everything which is related to this variable.