Need some help with these errors
#1

Hey everyone so as of right now im still learning about pawn and so on but for some reason i cant understand these errors i keep getting! i am creating a RP quiz in the beginning but i keep getting this errors when i attempt to Compile..



error 021: symbol already defined: "MP_OPC"
error 021: symbol already defined: "SSCANF_OnPlayerDisconnect"
error 021: symbol already defined: "OnPlayerText"


Can anyone explain what do these means?
Reply
#2

It means that those symbols are defined twice. If you want us to help, please show is your code.
Reply
#3

Quote:

new OnQuiz[MAX_PLAYERS], QuizSection[MAX_PLAYERS];

public OnPlayerConnect(playerid)

{

QuizSection[playerid] = -1;
OnQuiz[playerid] = -1;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, WHITE, "What do Roleplaying means?");
SendClientMessage(playerid, WHITE, "A. To Roll around");
SendClientMessage(playerid, WHITE, "B. To take a role of a Object");
SendClientMessage(playerid, WHITE, "C. To Take a role of a Player ");//This sends the first quiz message
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
//You will want to add the following:
OnQuiz[playerid] = 0;
QuizSection[playerid] = 0;
return 1;
}
//Test Questions
public OnPlayerText(playerid, text[])
{
if(OnQuiz[playerid] == 1) //This is checking if the player is on the quiz.
{
if(QuizSection[playerid] == 1) //This is checking if the player is on part 1.
{
if(!strcmp(text, "a", true)) //This is checking if the player typed A.
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Correct! Next Question:");
QuizSection[playerid] = 2; //This is setting the player to be on part 2.
SendClientMessage(playerid, WHITE, "What is the creator of SA-MP's name?");
SendClientMessage(playerid, WHITE, "A. Kalcor");
SendClientMessage(playerid, WHITE, "B. Dugi");
SendClientMessage(playerid, WHITE, "C. JaTochNietDan");
return 0;
}
else if(!strcmp(text, "b", true)) //This is checking the player typed B
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Wrong! You were kicked because you got it wrong.");
Kick(playerid);
return 0;
}
else if(!strcmp(text, "c", true)) //This is checking the player typed C
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Wrong! You were kicked because you got it wrong.");
Kick(playerid);
return 0;
}
else
{
SendClientMessage(playerid, WHITE, "Error: You can only use A, B or C."); //This is checking the player typed A B or C else it sends this
return 0;
}
}
if(QuizSection[playerid] == 2) //This is checking if the player is on section 2.
{
if(!strcmp(text, "a", true)) //This is checking the player typed A
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Correct! Next:");
QuizSection[playerid] = 3;
SendClientMessage(playerid, WHITE, "What is a Bullet?");
SendClientMessage(playerid, WHITE, "A. Car");
SendClientMessage(playerid, WHITE, "B. Truck");
SendClientMessage(playerid, WHITE, "C. Weapon");
return 0;
}
else if(!strcmp(text, "b", true)) //This is checking the player typed B
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Wrong! You were kicked because you got it wrong.");
Kick(playerid);
return 0;
}
else if(!strcmp(text, "c", true)) //This is checking the player typed C
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Wrong! You were kicked because you got it wrong.");
Kick(playerid);
return 0;
}
else
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Error: You can only use A, B or C."); //This is checking the player typed A B or C, else sends this message.
return 0;
}
}
if(QuizSection[playerid] == 3) //This is checking if the player is on section 3.
{
if(!strcmp(text, "a", true)) //This is checking the player typed A
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Correct! You can spawn!");
QuizSection[playerid] = 0;
OnQuiz[playerid] = 0;
TogglePlayerSpectating(playerid, false);//This is telling the script that the player isn't spectating anymore,
SetSpawnInfo(playerid, 0, 1, 123.4, 123.4, 123.4, 123.54, 0, 0, 0, 0, 0, 0); //This sets the players position, team and weapons.
SpawnPlayer(playerid); //This spawns the player
return 0;
}
else if(!strcmp(text, "b", true)) //This is checking the player typed B
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Wrong! You were kicked because you got it wrong.");
Kick(playerid);
return 0;
}
else if(!strcmp(text, "c", true)) //This is checking the player typed C
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Wrong! You were kicked because you got it wrong.");
Kick(playerid);
return 0;
}
else
{
SendClientMessage(playerid, WHITE, " ");
SendClientMessage(playerid, WHITE, "Error: You can only use A, B or C."); //This is checking the player typed A B or C, else sends this message.
return 0;
}
}
}
return 1;
}

That is the Coding! i was following the tutor But cant figure where i went wrong?


My other question is also how to use this Coding as a FilterScript? all the help will be Very Helpful
Reply
#4

post the code maybe i can check the error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)