Error Help
#1

Hey guys, I'm getting these errors with my Dialog
Код:
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1957) : warning 217: loose indentation
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1957) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1957) : error 004: function "OnPlayerClickPlayer" is not implemented
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1961) : error 030: compound statement not closed at the end of file (started at line 1928)
Line 1957:
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
Line 1957 has no use with what i am doing.
And there is no "line 1961"
Reply
#2

Put this:

PHP код:
forward OnPlayerClickPlayer(playeridclickedplayeridsource);
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{

        return 
1;

Reply
#3

Quote:
Originally Posted by radiobizza
Посмотреть сообщение
Put this:

PHP код:
forward OnPlayerClickPlayer(playeridclickedplayeridsource);
public 
OnPlayerClickPlayer(playeridclickedplayeridsource)
{
        return 
1;

more errors:l Here is the whole Dialog,

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_HELP)
	{
		if(response)
		{

	 		if(listitem == 0)
	 		{
		        ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: General", "Freeroam is owned by biggiephil.\nThe server has maps, teleports and more!", "Close", "");
			}
			if(listitem == 1)
			{
			    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Server Commands", "/afk\n/credits\n/whosawesome", "Close", "");
			}
			if(listitem == 2)
			{
			    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Teleport Commands", "/lva\n/sfa\n/lsa\n/bb\n/aa\n/aaj\n/lvj", "Close", "");
			}
			if(listitem == 3)
			{
			    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Vehicle Commands", "/flip\n/fix\n/flip", "Close", "");
			}
			if(listitem == 4)
			{
			    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Player Animations", "/sit\n/pee\n/wd", "Close", "");
			}
		}
		return 1;
}
Reply
#4

What is the error
Reply
#5

For that code,
Код:
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1957) : warning 217: loose indentation
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1957) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1957) : error 004: function "OnPlayerClickPlayer" is not implemented
C:\Users\User\Desktop\FreeRoam\gamemodes\freeroam.pwn(1961) : error 030: compound statement not closed at the end of file (started at line 1928)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Not sure why ??
Reply
#6

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_HELP)
    {
        if(
response)
        {
             if(
listitem == 0)
             {
                
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_MSGBOX"Freeroam: General""Freeroam is owned by biggiephil.\nThe server has maps, teleports and more!""Close""");
            }
            if(
listitem == 1)
            {
                
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_MSGBOX"Freeroam: Server Commands""/afk\n/credits\n/whosawesome""Close""");
            }
            if(
listitem == 2)
            {
                
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_MSGBOX"Freeroam: Teleport Commands""/lva\n/sfa\n/lsa\n/bb\n/aa\n/aaj\n/lvj""Close""");
            }
            if(
listitem == 3)
            {
                
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_MSGBOX"Freeroam: Vehicle Commands""/flip\n/fix\n/flip""Close""");
            }
            if(
listitem == 4)
            {
                
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_MSGBOX"Freeroam: Player Animations""/sit\n/pee\n/wd""Close""");
            }
        }
    }
    return 
1;

Missing bracket was causing those errors.
Reply
#7

Indeed, you need to each opening bracket also add a closing bracket.

So if { { { { 4 opening brackets, you also need to close 4 } } } }.

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_HELP)
    {
        if(response)
        {

            if(listitem == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: General", "Freeroam is owned by biggiephil.\nThe server has maps, teleports and more!", "Close", "");
            }
            if(listitem == 1)
            {
                ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Server Commands", "/afk\n/credits\n/whosawesome", "Close", "");
            }
            if(listitem == 2)
            {
                ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Teleport Commands", "/lva\n/sfa\n/lsa\n/bb\n/aa\n/aaj\n/lvj", "Close", "");
            }
            if(listitem == 3)
            {
                ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Vehicle Commands", "/flip\n/fix\n/flip", "Close", "");
            }
            if(listitem == 4)
            {
                ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Freeroam: Player Animations", "/sit\n/pee\n/wd", "Close", "");
            }
        }
    }// You forgot this one
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)