error 030: compound statement not closed at the end of file
#1

Код:
C:\Users\Imaniyya\Desktop\samp\filterscripts\musicstreamerversion1.1.pwn(254) : error 030: compound statement not closed at the end of file (started at line 225)
Код:
(Line 225)if(dialogid == 19912)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            switch(listitem)
            {
                case 0: ShowPlayerDialog(playerid,18945, DIALOG_STYLE_INPUT, "Stream Music For Your Self","{FFFFFF}Write the {009BFF}URL{FFFFFF} To Stream:", "Stream", "Cancel");
                case 1: if(IsPlayerVipType(playerid,1))
                        {
                        ShowPlayerDialog(playerid,18947, DIALOG_STYLE_INPUT, "Stream Music For Your Other Player","{FFFFFF}Write the {009BFF}URL{FFFFFF} To Stream:", "Stream", "Cancel");
                        }
                        else SendClientMessage(playerid, COLOR_RED, "ERROR: You not is a Silver or Gold Member!");
            }
	}
         return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
if(dialogid == 189945)
    {
    if(response)
    {
    for(new i=0; i<250; i++)
    {
    PlayAudioStreamForPlayer(i, inputtext);
    }
    return 1;
    }
    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
Please Help Me ..
Reply
#2

Where is line 254 then?

We cannot work this out like magicians...
Reply
#3

error 30
Quote:
Originally Posted by PAWNlang
An unexpected end of File occurred.
One or more compound statements are still unfinished
(i.e. the closing brace "}" has not been found).
you're missing a "}" somewhere above the code you posted.
meaning you opened a "compount statement" with "{"
but didn't close it with "}".
normally, it would've thrown 26 errors at you but here
we even have a EOF by chance somewhere above that code

as said, look for missing "}"
Reply
#4

Quote:
Originally Posted by MrCallum
Посмотреть сообщение
Where is line 254 then?

We cannot work this out like magicians...


actually at my script dosent have line 254...

here all the code


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

#include <a_samp>

#define Blue 0x02EAFDFF
#define COLOR_CONNECT 0x80FF00FF
#define COLOR_DISCONNECT 0xAFAFAFAA
#define BLUE 0xFF0000FF
#define COLOR_GREEN 0x80FF00FF
#define COLOR_RED 0xAFAFAFAA

#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 OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/stream", cmdtext, true, 10) == 0)
	{
        ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Music Streamer Made By Sahrul","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Stream", "Cancel");
        SendClientMessageToAll(COLOR_GREEN,"%s Has Stream A Song");
		return 1;
    }
    if (strcmp("/stopmusic", cmdtext, true, 10) == 0)
	{
        StopAudioStreamForPlayer(playerid);
        GameTextForPlayer(playerid, "Radio Stopped.",2500,1);
		return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 102) //
	{
      if(response)
		 {
      for(new i=0; i<250; i++)
     {
       if(IsPlayerConnected(i))
      {
           PlayAudioStreamForPlayer(i, inputtext);
         }
      }
    }
}

return 1;

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;  liine 253
}
Reply
#5

Quote:
Originally Posted by sahrul012
Посмотреть сообщение
actually at my script dosent have line 254...

here all the code


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

#include <a_samp>

#define Blue 0x02EAFDFF
#define COLOR_CONNECT 0x80FF00FF
#define COLOR_DISCONNECT 0xAFAFAFAA
#define BLUE 0xFF0000FF
#define COLOR_GREEN 0x80FF00FF
#define COLOR_RED 0xAFAFAFAA

#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 OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}

public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/stream", cmdtext, true, 10) == 0)
	{
        ShowPlayerDialog(playerid, 102, DIALOG_STYLE_INPUT, "Music Streamer Made By Sahrul","{FFFFFF}Write the {009BFF}URL{FFFFFF} from Radio Station:", "Stream", "Cancel");
        SendClientMessageToAll(COLOR_GREEN,"%s Has Stream A Song");
		return 1;
    }
    if (strcmp("/stopmusic", cmdtext, true, 10) == 0)
	{
        StopAudioStreamForPlayer(playerid);
        GameTextForPlayer(playerid, "Radio Stopped.",2500,1);
		return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 102) //
	{
      if(response)
		 {
      for(new i=0; i<250; i++)
     {
       if(IsPlayerConnected(i))
      {
           PlayAudioStreamForPlayer(i, inputtext);
         }
      }
    }
}

return 1;

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;  liine 253
}
as said before, youre missing a "}"
and indeed there is one missing, closing OnDialogResponse
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 102) //
    {
        if(response)
        {
            for(new i=0; i<250; i++)
            {
                if(IsPlayerConnected(i))
                {
                    PlayAudioStreamForPlayer(i, inputtext);
                }
            }
        }
    }
    return 1;
}//this one was missing
Reply
#6

Quote:
Originally Posted by CutX
Посмотреть сообщение
as said before, youre missing a "}"
and indeed there is one missing, closing OnDialogResponse
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 102) //
    {
        if(response)
        {
            for(new i=0; i<250; i++)
            {
                if(IsPlayerConnected(i))
                {
                    PlayAudioStreamForPlayer(i, inputtext);
                }
            }
        }
    }
    return 1;
}//this one was missing
thank you so much for help me.....
Reply
#7

you do not have numbers on the left side of pawno??:



EDIT: Oh wait i think i get it, and by the way, where did you get that (line 225) thing..., the error says it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)