SA-MP Forums Archive
Errors :S - 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: Errors :S (/showthread.php?tid=234988)



Errors :S - cloudysky - 04.03.2011

pawn Код:
(672) : error 017: undefined symbol "Player"
(672) : warning 215: expression has no effect
(672) : error 001: expected token: ";", but found "]"
(672) : error 029: invalid expression, assumed zero
(672) : fatal error 107: too many error messages on one line
And here is the script lines:

pawn Код:
}
                case 4:
                {
                    if( Player[playerid][Checkpoint] >= 1) //Error line here
                    {
                        Player[playerid][Checkpoint] = 0;
                        DisablePlayerCheckpoint( playerid );
                        SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
                        SendClientMessage(playerid, WHITE, "Checkpoint clear!" );
                        SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
                    }
                    else
                    {
                        SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
                        SendClientMessage(playerid, WHITE, "Error: Cannot clear checkpoint if there isn't one!" );
                        SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
                    }
                }
            }
        }
    }
    return 1;
}
Thanks for any help!


Re: Errors :S - Marricio - 04.03.2011

It isn't PlayerInfo?


Re: Errors :S - Stigg - 04.03.2011

Код:
Player[playerid][Checkpoint] = 0;
Is where your problem is.


Re: Errors :S - Marricio - 04.03.2011

pawn Код:
if( PlayerInfo[playerid][Checkpoint] >= 1)
Shouldn't be like that?


Re: Errors :S - cloudysky - 04.03.2011

Ok, first off thanks for the response. Any ideas on how to fix this?


Quote:
Originally Posted by Marricio
Посмотреть сообщение
pawn Код:
if( PlayerInfo[playerid][Checkpoint] >= 1)
Shouldn't be like that?
I get the same errors/warnings


Re: Errors :S - Stigg - 04.03.2011

Have you got:

Код:
Player[MAX_PLAYERS]
Or:

Код:
PlayerInfo[MAX_PLAYERS]
or something like that.

Near the top of your script ?


Re: Errors :S - cloudysky - 04.03.2011

pawn Код:
#define Player[MAX_PLAYERS]
?


Re: Errors :S - Marricio - 04.03.2011

pawn Код:
new Player[MAX_PLAYERS][pInfo]; // Switch the pInfo to your enum name..
example..
pawn Код:
enum pInfo
{
    pScore,
    pMoney,
    pAdmin
}
new Player[MAX_PLAYERS][pInfo];
Try?


Re: Errors :S - Stigg - 04.03.2011

Quote:
Originally Posted by cloudysky
Посмотреть сообщение
pawn Код:
#define Player[MAX_PLAYERS]
?
Try:

Код:
new Player[MAX_PLAYERS];
Under your defines, delete that define you have.


Re: Errors :S - cloudysky - 04.03.2011

Thanks to all comments. Stigg your a god and i now worship you.

Nah but thanks a bunch :P