Script error. Need help!
#1

Hello guys. I'll be very happy if you help with sorting out this error:
Warning 225: unreachable code. (The line is colored in red)
Here is the script:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
		return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
		return 1;
	}

	if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
	}
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    return 0;
    }

	new string[200];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new giveplayerid, idx;
	new idcar = GetPlayerVehicleID(playerid);
	cmd = strtok(cmdtext, idx);
Reply
#2

try this and dont forget to add new str[200]; in new line below includes ! :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
		return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
		return 1;
	}

	if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
	}
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    return 0;
    }

	new str[200];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new giveplayerid, idx;
	new idcar = GetPlayerVehicleID(playerid);
	cmd = strtok(cmdtext, idx);
Reply
#3

you might do like this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    
	new string[200];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new giveplayerid, idx;
	new idcar = GetPlayerVehicleID(playerid);
	cmd = strtok(cmdtext, idx);
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
		return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
		return 1;
	}

	if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
	}
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    return 0;
    }
//The Further Script if u have....
Reply
#4

When I tried Avi's decision, it gave me more errors.
When I tried Torus'es decision it gave me this error:
Warning 225: unreachable code (the next line).
This:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    
	new string[200];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new giveplayerid, idx;
	new idcar = GetPlayerVehicleID(playerid);
	cmd = strtok(cmdtext, idx);
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
		return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
		return 1;
	}

	if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
	}
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    return 0;
    }
if(strcmp(cmd, "/tickets", true) == 0)
Reply
#5

Hmm unreachable code Is mostly for "return's"
Like If You Have 2 Return 1 at a time or 2 return 0 ; at a time just give us the whole code so we can look into it and solve ur prob dont give us partly otherwise paste it in www.pastebin.com and post the link here....
Reply
#6

Post the errors that Avi57's solution created. More errors can sometimes be a better outcome than a single error. Might sound stupid but it helps you solve a lot more flaws in your script.
Reply
#7

Avi57's Solution!
Script:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
		return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
		return 1;
	}

	if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
	}
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    return 0;
    }

	new str[200]; //line 9651
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new giveplayerid, idx;
	new idcar = GetPlayerVehicleID(playerid);
	cmd = strtok(cmdtext, idx);
//===============================[Ticket System]=================================================

    if(strcmp(cmd, "/tickets", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pTicket][0] > 0)
		    {
		  (Line 9670)      format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][0], PlayerInfo[playerid][pTicketReason0]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][1] > 0)
		    {
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][1], PlayerInfo[playerid][pTicketReason1]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][2] > 0)
		    {
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][2], PlayerInfo[playerid][pTicketReason2]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][3] > 0)
	    	{
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][3], PlayerInfo[playerid][pTicketReason3]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][4] > 0)
		    {
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][4], PlayerInfo[playerid][pTicketReason4]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][0] == 0 && PlayerInfo[playerid][pTicket][1] == 0 && PlayerInfo[playerid][pTicket][2] == 0 && PlayerInfo[playerid][pTicket][3] == 0 && PlayerInfo[playerid][pTicket][4] == 0)
		    {
		        SendClientMessage(playerid, COLOR_GRAD2, "You do not have any unpaid tickets !");
		    }
	    }
	    return 1;
	}
Errors:
s.TMP(9651): Warning 225: unreachable code
s.TMP(9670): Error 017: undefined symbol "string"
s.TMP(9670): Error 017: undefined symbol "string"
s.TMP(9670): Error 029: invaid expression, assumed zero
s.TMP(9670): Fatal error 107: too many error messages on one line.
Reply
#8

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
        return 1;
    }

    if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
    }
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    }

    new str[200]; //line 9651
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new name[MAX_PLAYER_NAME];
    new cmd[128];
    new tmp[128];
    new giveplayerid, idx;
    new idcar = GetPlayerVehicleID(playerid);
    cmd = strtok(cmdtext, idx);
//===============================[Ticket System]=================================================

    if(strcmp(cmd, "/tickets", true) == 0)
    {
        new string[256];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pTicket][0] > 0)
            {
          format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][0], PlayerInfo[playerid][pTicketReason0]);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            if(PlayerInfo[playerid][pTicket][1] > 0)
            {
                format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][1], PlayerInfo[playerid][pTicketReason1]);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            if(PlayerInfo[playerid][pTicket][2] > 0)
            {
                format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][2], PlayerInfo[playerid][pTicketReason2]);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            if(PlayerInfo[playerid][pTicket][3] > 0)
            {
                format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][3], PlayerInfo[playerid][pTicketReason3]);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            if(PlayerInfo[playerid][pTicket][4] > 0)
            {
                format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][4], PlayerInfo[playerid][pTicketReason4]);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            if(PlayerInfo[playerid][pTicket][0] == 0 && PlayerInfo[playerid][pTicket][1] == 0 && PlayerInfo[playerid][pTicket][2] == 0 && PlayerInfo[playerid][pTicket][3] == 0 && PlayerInfo[playerid][pTicket][4] == 0)
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You do not have any unpaid tickets !");
            }
        }
        return 1;
    }
Reply
#9

Script involved:
Код:
if(strcmp(cmd, "/payticket", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerToPoint(10.0, playerid,362.2424,173.6452,1008.3828) || PlayerToPoint(10.0, playerid,252.3490,117.3676,1003.2188))
	        {
	        	if(PlayerInfo[playerid][pTicket][0] > 0)
		    	{
					if(GetPlayerPCash(playerid) >= PlayerInfo[playerid][pTicket][0])
					{
		            	(Line 9769) format(string, sizeof(string), "You have paid a ticket that costed: $%d", PlayerInfo[playerid][pTicket][0]);
		            	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		            	GivePlayerPCash(playerid,-PlayerInfo[playerid][pTicket][0]);
		            	PlayerInfo[playerid][pTicket][0] = 0;
		        	}
		        	else
		        	{
		            	SendClientMessage(playerid, COLOR_GREY, "You cannot afford the tickets price !");
				    	return 1;
		        	}
		    	}
		    	else if(PlayerInfo[playerid][pTicket][1] > 0)
		    	{
					if(GetPlayerPCash(playerid) >= PlayerInfo[playerid][pTicket][1])
					{
		            	format(string, sizeof(string), "You have paid a ticket that costed: $%d", PlayerInfo[playerid][pTicket][1]);
		            	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		            	GivePlayerPCash(playerid,-PlayerInfo[playerid][pTicket][1]);
		            	PlayerInfo[playerid][pTicket][1] = 0;
		        	}
		        	else
		        	{
		            	SendClientMessage(playerid, COLOR_GREY, "You cannot afford the tickets price !");
				    	return 1;
		        	}
		    	}
		    	else if(PlayerInfo[playerid][pTicket][2] > 0)
		    	{
					if(GetPlayerPCash(playerid) >= PlayerInfo[playerid][pTicket][2])
					{
		            	format(string, sizeof(string), "You have paid a ticket that costed: $%d", PlayerInfo[playerid][pTicket][2]);
		            	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		            	GivePlayerPCash(playerid,-PlayerInfo[playerid][pTicket][2]);
		            	PlayerInfo[playerid][pTicket][2] = 0;
		        	}
		        	else
		        	{
		            	SendClientMessage(playerid, COLOR_GREY, "You cannot afford the tickets price !");
				    	return 1;
		        	}
		    	}
		    	else if(PlayerInfo[playerid][pTicket][3] > 0)
		    	{
					if(GetPlayerPCash(playerid) >= PlayerInfo[playerid][pTicket][3])
					{
		            	format(string, sizeof(string), "You have paid a ticket that costed: $%d", PlayerInfo[playerid][pTicket][3]);
		            	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		            	GivePlayerPCash(playerid,-PlayerInfo[playerid][pTicket][3]);
		           	 	PlayerInfo[playerid][pTicket][3] = 0;
		        	}
		        	else
		        	{
		            	SendClientMessage(playerid, COLOR_GREY, "You cannot afford the tickets price !");
				    	return 1;
		        	}
		    	}
		    	else if(PlayerInfo[playerid][pTicket][4] > 0)
		   	 	{
					if(GetPlayerPCash(playerid) >= PlayerInfo[playerid][pTicket][4])
					{
		            	format(string, sizeof(string), "You have paid a ticket that costed: $%d", PlayerInfo[playerid][pTicket][4]);
		            	SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		            	GivePlayerPCash(playerid,-PlayerInfo[playerid][pTicket][4]);
		            	PlayerInfo[playerid][pTicket][4] = 0;
		        	}
		        	else
		        	{
		            	SendClientMessage(playerid, COLOR_GREY, "You cannot afford the tickets price !");
				   	 	return 1;
		        	}
		    	}
		    	else
		    	{
		        	SendClientMessage(playerid, COLOR_GREY, "You dont have any unpaid tickets !");
					return 1;
		    	}
		    }
		    else
		    {
		        SendClientMessage(playerid, COLOR_GREY, "Your not at the City Hall front desk or Police Station front counter.");
				return 1;
	        }
	    }
	    return 1;
	}
Errors:
s.TMP(9769): error 017: undefined symbol "string"
s.TMP(9769): error 017: undefined symbol "string"
s.TMP(9769): error 029: invalid expression, assumed zero
s.TMP(9769): Fatal error 107: too many error messages on one line
Reply
#10

Quote:
Originally Posted by PhoeNiX778
Посмотреть сообщение
Avi57's Solution!
Script:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(GetPVarInt(playerid, "RegistrationStep") >= 5)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
		return 1;
    }

    if(PlayerInfo[playerid][pBenchPresses] != 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, "You cannot use this while bench pressing.");
		return 1;
	}

	if(PlayerInfo2[UsingSpawnBar][playerid] > 0)
	{
	    SendClientMessage(playerid, COLOR_LIGHTRED, " You cannot do this right now !");
        return 1;
	}
 {
 if(!strcmp(cmdtext, "/go", true))
 {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 0.3999999523163, 0.0, 0.0, 56, 0.0);
            return 1;
        }
 }
     else if(strcmp(cmdtext, "/close", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 15.0, -2275.8000488281, 2348.8000488281, 3.7999999523163))
        {
            MoveObject(BSSDGate, -2275.8000488281, 2348.8000488281, 3.7999999523163, 0.0, 0.0, 56, 100.0);
            return 1;
        }
    }
    return 0;
    }

	new str[200]; //line 9651
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new name[MAX_PLAYER_NAME];
	new cmd[128];
	new tmp[128];
	new giveplayerid, idx;
	new idcar = GetPlayerVehicleID(playerid);
	cmd = strtok(cmdtext, idx);
//===============================[Ticket System]=================================================

    if(strcmp(cmd, "/tickets", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pTicket][0] > 0)
		    {
		  (Line 9670)      format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][0], PlayerInfo[playerid][pTicketReason0]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][1] > 0)
		    {
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][1], PlayerInfo[playerid][pTicketReason1]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][2] > 0)
		    {
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][2], PlayerInfo[playerid][pTicketReason2]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][3] > 0)
	    	{
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][3], PlayerInfo[playerid][pTicketReason3]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][4] > 0)
		    {
		        format(string, sizeof(string), "Unpaid Ticket: $%d | Reason: %s", PlayerInfo[playerid][pTicket][4], PlayerInfo[playerid][pTicketReason4]);
		        SendClientMessage(playerid, COLOR_WHITE, string);
		    }
		    if(PlayerInfo[playerid][pTicket][0] == 0 && PlayerInfo[playerid][pTicket][1] == 0 && PlayerInfo[playerid][pTicket][2] == 0 && PlayerInfo[playerid][pTicket][3] == 0 && PlayerInfo[playerid][pTicket][4] == 0)
		    {
		        SendClientMessage(playerid, COLOR_GRAD2, "You do not have any unpaid tickets !");
		    }
	    }
	    return 1;
	}
Errors:
s.TMP(9651): Warning 225: unreachable code
s.TMP(9670): Error 017: undefined symbol "string"
s.TMP(9670): Error 017: undefined symbol "string"
s.TMP(9670): Error 029: invaid expression, assumed zero
s.TMP(9670): Fatal error 107: too many error messages on one line.
read my post carefully ! Told you add new string[200];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)