2 Errors in compiler, but I cant seem to fix it?
#1

Hey guys, I got an Admin Sytem, here is the code:

http://pastebin.com/w7xp2NJS


And I compiled it and I got these errors:


Код:
C:\Documents and Settings\Danny.YOUR-E6F02835AE\My Documents\Roleplay test server\filterscripts\testfs.pwn(315) : error 017: undefined symbol "GetPlayerID"
C:\Documents and Settings\Danny.YOUR-E6F02835AE\My Documents\Roleplay test server\filterscripts\testfs.pwn(342) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
But I really cant seem to fix the errors, I really need your help. Thanks
Reply
#2

Код:
C:\Documents and Settings\Danny.YOUR-E6F02835AE\My Documents\Roleplay test server\filterscripts\testfs.pwn(315) : error 017: undefined symbol "GetPlayerID"
pawn Код:
new GetPlayerID
This can either go on top of your script of before the life you are going to use it on.

Код:
C:\Documents and Settings\Danny.YOUR-E6F02835AE\My Documents\Roleplay test server\filterscripts\testfs.pwn(342) : warning 203: symbol is never used: "ret_memcpy"
pawn Код:
#pragma unused ret_memcpy
This add it where you have your includes listed.
Reply
#3

ret_memcpy is a function in the dutils.inc include. It just simply tells you that it have never been used. To hide this error, simply add this line along with defines
pawn Код:
#pragma unused ret_memcpy
As for your first error, you're trying to use a function that doesn't exist. Here's an example of that function, which you have to add to your script:
pawn Код:
GetPlayerID(name[])
{
    for( new i = 0; i < MAX_PLAYERS; i ++ ) //or foreach( Player, i )
    {
        if( IsPlayerConnected( i ))
        {
            new
                pname[ MAX_PLAYER_NAME + 1 ];
            GetPlayerName( i, pname, sizeof( pname ));
            if( !strcmp( name, pname ))
                return i;
         }
     }
     return INVALID_PLAYER_ID;
}
Although I'd recommend looking up on sscanf - which would make this much easier.
Reply
#4

When I add
Код:
#pragma unused ret_memcpy
to the top, it comes up with like 26 errors saying this:

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(37) : error 017: undefined symbol "gSettings"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(38) : error 017: undefined symbol "gSettings"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(39) : error 017: undefined symbol "gSettings"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(40) : error 017: undefined symbol "gSettings"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(41) : error 017: undefined symbol "gSettings"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(71) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(72) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(73) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(74) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(75) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(76) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(77) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(78) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(79) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(80) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(81) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(82) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(83) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(84) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(85) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(86) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(87) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(88) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(89) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(90) : error 017: undefined symbol "gCommands"
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\ROLEPL~4\FILTER~1\AdminFS.pwn(91) : error 017: undefined symbol "gCommands"

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


26 Errors.
Please help me
Reply
#5

SOMEONE PLEASE HELP ME!!!
Reply
#6

Make, sure you have defined the variable's before using them. Simply add define [Name of Variable Here] tot he top of your script. Also make sure you have all the ; at the end of lines so the defines don't claim two of your variables.

Hope this helps

Azzerking
Reply
#7

26 errors are usually caused by a missing brace } somewhere. Go look for it.
Reply
#8

The warning just tells you there's a variable called ret_memcpy. It does not interfere with the script's functioning. It just points you out that "Hey, there's a variable you made but never used. Perhaps you meant to use it at some point?"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)