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



Errors - Tuntun - 18.09.2014


E:\New folder\gamemodes\roleplay.pwn(77494) : error 017: undefined symbol "OnQuiz"
E:\New folder\gamemodes\roleplay.pwn(77494) : warning 215: expression has no effect
E:\New folder\gamemodes\roleplay.pwn(77494) : error 001: expected token: ";", but found "]"
E:\New folder\gamemodes\roleplay.pwn(77494) : error 029: invalid expression, assumed zero
E:\New folder\gamemodes\roleplay.pwn(77494) : fatal error 107: too many error messages on one line

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


4 Errors.



my codes:
Код:
	if(RegistrationStep[playerid] > 0)
	{
		if(RegistrationStep[playerid] == 1)
		{
			if (strcmp("male", text, true) == 0)
			{
				PlayerInfo[playerid][pSex] = 1;
				SendClientMessageEx(playerid, COLOR_YELLOW2, "{FFFFFF}Alright, so you're a male.");
				SendClientMessageEx(playerid, COLOR_LIGHTRED, "{FFFFFF}What is your date of birth?");
				SendClientMessageEx(playerid, COLOR_LIGHTRED, "{FFFFFF}Please Use This format? (dd/mm/yyyy).");
				RegistrationStep[playerid] = 2;
				return 0;
			}
			else if (strcmp("female", text, true) == 0)
			{
				PlayerInfo[playerid][pSex] = 2;
				SendClientMessageEx(playerid, COLOR_YELLOW2, "{FFFFFF}Alright, so you're a female.");
				SendClientMessageEx(playerid, COLOR_LIGHTRED, "{FFFFFF}What is your date of birth? (Use dd/mm/yyyy)");
				SendClientMessageEx(playerid, COLOR_LIGHTRED, "{FFFFFF}Please Use This format? (dd/mm/yyyy).");
				RegistrationStep[playerid] = 2;
				return 0;
			}
			else
			{
   				 SendClientMessageEx(playerid, COLOR_LIGHTRED, "{FFFFFF}Are you a male or female? Type in your choice.");
			}
			return 0;
		}
		else if(RegistrationStep[playerid] == 2)
		{
			new year, month,day;
			getdate(year, month, day);
			new DateInfo[3][20];
			splits(text, DateInfo, '/');
			if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
			{
				SendClientMessageEx(playerid, COLOR_LIGHTRED, "{009900}[REGISTER]{FFFFFF}What is your date of birth? (Use dd/mm/yyyy)");
				return 0;
			}
			new check = year - strval(DateInfo[2]);
			if(check == year)
			{
				SendClientMessageEx(playerid, COLOR_LIGHTRED, "{009900}[REGISTER]{FFFFFF}What is your date of birth? (Use dd/mm/yyyy)");
				return 0;
			}
			if(strval(DateInfo[1]) > month)
			{
				check -= 1;
			}
			else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
			{
				check -= 1;
			}
			else if(RegistrationStep[playerid] == 3)
			{
			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.
		 		{
		 		RegistrationStep[playerid] = 3;
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "Correct! Next:");
                QuizSection[playerid] = 2; //This is setting the player to be on part 2.
                SendClientMessage(playerid, -1, "What is MG?");
                SendClientMessage(playerid, -1, "A. Meta Gaming -Mixing OOC Ic'ly");
                SendClientMessage(playerid, -1, "B. Meet Game - Meeting in game");
                SendClientMessage(playerid, -1, "C. Mayne Game");
                return 0;
            }
            else if(!strcmp(text, "b", true)) //This is checking the player typed B
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "{FF0000}Wrong answer. Kicked");
                Kick(playerid);
                return 0;
            }
            else if(!strcmp(text, "c", true)) //This is checking the player typed C
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "Wrong! You were kicked because you got it wrong.");
                Kick(playerid);
                return 0;
            }
            else
            {
                SendClientMessage(playerid, -1, "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] == 1) //This is checking if the player is on section 2.
        {
            if(!strcmp(text, "a", true)) //This is checking the player typed A
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "Correct! Next:");
                QuizSection[playerid] = 3;
                SendClientMessage(playerid, -1, "What is DM?");
                SendClientMessage(playerid, -1, "A. Death Match");
                SendClientMessage(playerid, -1, "B.	Dead Match");
                SendClientMessage(playerid, -1, "C. Die Match");
                return 0;
            }
            else if(!strcmp(text, "b", true)) //This is checking the player typed B
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "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, -1, " ");
                SendClientMessage(playerid, -1, "Wrong! You were kicked because you got it wrong.");
                Kick(playerid);
                return 0;
            }
            else
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "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] == 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, -1, " ");
                SendClientMessage(playerid, -1, "Correct! Next:");
                QuizSection[playerid] = 3;
                SendClientMessage(playerid, -1, "What will you do if you see a hacker?");
                SendClientMessage(playerid, -1, "A. I will /report it");
                SendClientMessage(playerid, -1, "B. I will ask him for the download link");
                SendClientMessage(playerid, -1, "C. I will laugh and watch continue :D");
                return 0;
            }
            else if(!strcmp(text, "b", true)) //This is checking the player typed B
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "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, -1, " ");
                SendClientMessage(playerid, -1, "Wrong! You were kicked because you got it wrong.");
                Kick(playerid);
                return 0;
            }
            else
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "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] == 4) //This is checking if the player is on section 2.
        {
            if(!strcmp(text, "b", true)) //This is checking the player typed A
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "Correct! Next:");
                QuizSection[playerid] = 3;
                SendClientMessage(playerid, -1, "What is IC and OOC?");
                SendClientMessage(playerid, -1, "A. In Car and Out of Car");
                SendClientMessage(playerid, -1, "B. In characther and out of characther");
                SendClientMessage(playerid, -1, "C. In Cricket and out of cricket");
                return 0;
            }
            else if(!strcmp(text, "a", true)) //This is checking the player typed B
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "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, -1, " ");
                SendClientMessage(playerid, -1, "Wrong! You were kicked because you got it wrong.");
                Kick(playerid);
                return 0;
            }
            else
            {
                SendClientMessage(playerid, -1, " ");
                SendClientMessage(playerid, -1, "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, -1, " ");
                SendClientMessage(playerid, -1, "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, -1, " ");
                SendClientMessage(playerid, -1, "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, -1, " ");
                SendClientMessage(playerid, -1, "Wrong! You were kicked because you got it wrong.");
                Kick(playerid);
                return 0;
            }
            else
            {
                	SendClientMessage(playerid, -1, " ");
            	    SendClientMessage(playerid, -1, "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;
    	    	    }
    		    }
    		}
line 77494: else if(RegistrationStep[playerid] == 3)


Re: Errors - Eth - 18.09.2014

pawn Код:
new OnQuiz[MAX_PLAYERS];
put that at the top of ur script