Paintball help
#1

Hello, I have a good paintball system in my game-mode but no actual way to get into the game or anything... This is my command to show the dialog...

Код:
CMD:paintball(playerid, params[])
{
		if (IsPlayerInRangeOfPoint(playerid,3,1038.08, -3.98, 1001.28))
		{
			ShowPlayerDialog(playerid, PBMAINMENU, DIALOG_STYLE_LIST, "Paintball","Choose Arena/Set-Up\Purhcase tokens\nPaintball", "Select", "Cancel");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of the paintball waiting room.. ");
		}
	}
	return 1;
}
This is that dialog "PBMAINMENU"

Код:
if(dialogid == PBMAINMENU) // Paintball Arena System
	{
		if(response == 1)
		{
		    switch(listitem)
		    {
		        case 0: // Choose a Arena
		        {
		            PaintballArenaSelection(playerid);
		        }
		        case 1: // Buy Paintball Tokens
		        {
		            PaintballTokenBuyMenu(playerid);
		        }
		        case 2:
		        {
		            if(PlayerInfo[playerid][pAdmin] >= 1337)
		            {
		            	PaintballAdminMenu(playerid);
					}
					else
					{
					    PaintballMainMenu(playerid);
					    SendClientMessageEx(playerid, COLOR_GRAD2, "You do not have authorization to access the admin panel.");
					    return 1;
					}
		        }
		    }
		}
	}
And the errors....

Код:
error 027: invalid character constant
error 027: invalid character constant
error 010: invalid function or declaration
Reply
#2

pawn Код:
Choose Arena/Set-Up\Purhcase tokens\nPaintball
to

pawn Код:
Choose Arena/Set-Up\nPurhcase tokens\nPaintball
You missed the character "n" after the forward slash and the letter P in the world Purchase.

So, this is correct:

pawn Код:
ShowPlayerDialog(playerid, PBMAINMENU, DIALOG_STYLE_LIST, "Paintball","Choose Arena/Set-Up\nPurhcase tokens\nPaintball", "Select", "Cancel");
Reply
#3

Now

Код:
CMD:paintball(playerid, params[])
{
		if (IsPlayerInRangeOfPoint(playerid,3,1038.08, -3.98, 1001.28))
		{
			ShowPlayerDialog(playerid, PBMAINMENU, DIALOG_STYLE_LIST, "Paintball","Choose Arena/Set-Up\nPurhcase tokens\nPaintball", "Select", "Cancel");
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of the paintball waiting room.. ");
		}
	}
	return 1;
}
Errors...

Код:
error 010: invalid function or declaration
Thats on the line "Return; 1".
Reply
#4

pawn Код:
CMD:paintball(playerid, params[])
{
        if (IsPlayerInRangeOfPoint(playerid,3,1038.08, -3.98, 1001.28))
        {
            ShowPlayerDialog(playerid, PBMAINMENU, DIALOG_STYLE_LIST, "Paintball","Choose Arena/Set-Up\nPurhcase tokens\nPaintball", "Select", "Cancel");
        }
        else return SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of the paintball waiting room.. ");
}
Reply
#5

If as above doesn't work, show us the line that the error is occurring on.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)