What s wrong with this?
#1

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/jobs", true) == 0)
	{
		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Teleport Menu", "Policeman \n SWAT \n Taxi \n Whore \n Medic", "Select", "Cancel");
		return 1;
	}
	return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2)
	{
		if(response)
		{
			new message[256+1];
			if(listitem == 0)
			{
			format(message, 256, "Welcome to the [AF]Police department!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	SetPlayerSkin(playerid, 282);
		  	SetPlayerPos(playerid, 2238.2217,2449.5750,11.0372);
 			}
			if(listitem == 1)
			{
			  format(message, 256, "Welcome to the [AF]S.W.A.T", listitem);
			  SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 285);
        SetPlayerPos(playerid, -1447.2, 426.9, 31.0);

  			}
  			if(listitem == 2)
			{
			  format(message, 256, "Welcome to the Taxi company!", listitem);
			  SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 262);
        SetPlayerPos(playerid, 2191.6074,1676.6697,12.0886);

  			}
  			if(listitem == 3)
			{
			  format(message, 256, "You are now a Whore!", listitem);
			  SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 85);
        SetPlayerPos(playerid, 2421.3354,-1224.8848,25.1766);
  			}
      if(listitem == 4)
			{
			  format(message, 256, "Welcome to the medical department!", listitem);
			  SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 274);
        SetPlayerPos(playerid, 1775.7734,2064.7734,10.8203);
      }
	 }
i get the error: D:\Aaron server\filterscripts\teles.pwn(8 : error 030: compound statement not closed at the end of file (started at line 46)
help please

thanks
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2)
    {
        if(response)
        {
            new message[256+1];
            if(listitem == 0)
            {
            format(message, 256, "Welcome to the [AF]Police department!", listitem);
            SendClientMessage(playerid, 0xFFFFFFFF, message);
            SetPlayerSkin(playerid, 282);
            SetPlayerPos(playerid, 2238.2217,2449.5750,11.0372);
            }
            if(listitem == 1)
            {
              format(message, 256, "Welcome to the [AF]S.W.A.T", listitem);
              SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 285);
        SetPlayerPos(playerid, -1447.2, 426.9, 31.0);

            }
            if(listitem == 2)
            {
              format(message, 256, "Welcome to the Taxi company!", listitem);
              SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 262);
        SetPlayerPos(playerid, 2191.6074,1676.6697,12.0886);

            }
            if(listitem == 3)
            {
              format(message, 256, "You are now a Whore!", listitem);
              SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 85);
        SetPlayerPos(playerid, 2421.3354,-1224.8848,25.1766);
            }
      if(listitem == 4)
            {
              format(message, 256, "Welcome to the medical department!", listitem);
              SendClientMessage(playerid, 0xFFFFFFFF, message);
        SetPlayerSkin(playerid, 274);
        SetPlayerPos(playerid, 1775.7734,2064.7734,10.8203);
      }
     }
     }
     }
Should work.
Reply
#3

Thanks man....but can u explain what happend there?
Reply
#4

Quote:
Originally Posted by rohan234
Like 7 loose indentations
Actually i pasted the whole thing to a new .pwn file and had no loose indentations,probably [ pawn ] [ /pawn ] tags fucked up my perfect indentation.
Anyhow it won't effect anything,but try fixing the indentations by yourself though,you don't want a messy compiler.

Quote:
Originally Posted by rohan234
Thanks man....but can u explain what happend there?
EDIT: Wtf did you edit your post?
Anyway you didn't close your code properly,which made pawn "think" that you have something that should be after it,but it didn't recognize anything,so it sent you an error(you forgot two closing brackets).
Reply
#5

You didnt close it properly. Pawno thought thee was more to go
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)