What does this error mean? -
wiZaK - 28.02.2009
error 001: expected token: "*then", but found "-identifier-" ??
I cant get past this, Im trying o make a checkpoint with SetplayerCheckpoint its that line wich is messing up.
Line looks like this,
Код:
SetPlayerCheckpoint(i,posX,posY,posZ,5.0);
Ive tried it with { infront at the line above and having the } at the wery back aswell as putting it like { on a single own row and the last } on an own line. Still get this same error on that line. also tried it without the { } but still get the same problem.
Re: What does this error mean? -
Nimphious - 28.02.2009
pawn Код:
SetPlayerCheckpoint(playerid,posX,posY,posZ,5.0);
Re: What does this error mean? -
wiZaK - 28.02.2009
Forgot to mention i want it to be created for a whole team so its
Код:
{
GetPlayerPos(playerid,posX,posY,posZ);
for(new i=0; i<MAX_PLAYERS; i++)
if i == GetTeamByName ("Lambo")
SetPlayerCheckpoint(i,posX,posY,posZ,5.0);
SendTeamMessage(Team1, COLOR_RED, "Lambo Team Gather!");
return 1;
}
If i make it
Код:
{
GetPlayerPos(playerid,posX,posY,posZ);
for(new i=0; i<MAX_PLAYERS; i++)
if i == GetTeamByName ("Lambo")
SetPlayerCheckpoint(playerid,posX,posY,posZ,5.0);
SendTeamMessage(Team1, COLOR_RED, "Lambo Team Gather!");
return 1;
}
Wont that only set a wp for that specific player and not the whole team?
Re: What does this error mean? -
JaYmE - 28.02.2009
pawn Код:
{
 GetPlayerPos(playerid,posX,posY,posZ);
 for ( new i = 0; i < MAX_PLAYERS; i++ ) {
 if ( i == GetTeamByName ("Lambo") ) {
 SetPlayerCheckpoint(i,posX,posY,posZ,5.0);
 SendTeamMessage(Team1, COLOR_RED, "Lambo Team Gather!");
 }
return 1;
}
There you go it should work
EDIT: oops thats wrong proper code is:
pawn Код:
{
 GetPlayerPos(playerid,posX,posY,posZ);
 new Team[MAX_PLAYERS] = GetTeamByName ("Lambo");
 for ( new i = 0; i < MAX_PLAYERS; i++ ) {
 if ( Team[i] == 5 ) {
 SetPlayerCheckpoint(i,posX,posY,posZ,5.0);
 SendTeamMessage(Team1, COLOR_RED, "Lambo Team Gather!");
 }
 }
 return 1;
}
Re: What does this error mean? -
Vince - 28.02.2009
What's this supposed to do?
Код:
if i == GetTeamByName ("Lambo")
Any loose brackets, maybe?
Re: What does this error mean? -
JaYmE - 28.02.2009
Quote:
Originally Posted by Vince
What's this supposed to do?
Код:
if i == GetTeamByName ("Lambo")
Any loose brackets, maybe?
|
lol it should be:
Код:
i = GetTeamByName ("Lambo")
if ( i == the team id here E.G: 5 ) {
Re: What does this error mean? -
wiZaK - 28.02.2009
Dont get those to work, get major error on the rest of the script, when using that.
Re: What does this error mean? -
wiZaK - 28.02.2009
Anyone else know what the error means or ever come across it?
Re: What does this error mean? -
wiZaK - 01.03.2009
Anyone?, Im sure somone has come across it, I cant be the only one.
Re: What does this error mean? -
JaYmE - 01.03.2009
Well most people know how to script
if its that bad why dont you remove the code and rewrite it :P
with working code
maybe use
https://sampwiki.blast.hk/wiki/Main_Page