[Urgent] I need some real help with this, as i am having continuos errors...
#1

Hello.... i need to know what the answer is to my problem here... (yet another one... D=)

Sorry to sound rude or pushy... but i am in a very very big rush right now.

anyways.... here's the error code..

Код:
C:\Users\owner\Desktop\my samp server\gamemodes\Servertest.pwn(4371) : error 030: compound statement not closed at the end of file (started at line 4071)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



when i go to where it says the problem is, (line 4071) this is what's there and all around it....



Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2)
	{
		if(response)
		{
	                new message[256+1]; //line 4071 is here........<<<<<<<<<<<<<<<<<<<<<<<<<<
			if(listitem == 0)
			{
			format(message, 256, "You selected Sunt 1, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
                SetVehiclePos(GetPlayerVehicleID(playerid), 2077.7571,-2544.5229,13.5469);
                ResetPlayerWeapons(playerid);
                }

                else {
                SetPlayerPos(playerid, 2077.7571,-2544.5229,13.5469);
        		ResetPlayerWeapons(playerid);
 			}
			if(listitem == 1)



so if you could please help, i would be very grateful!
Reply
#2

sorry! didnt mean to bump this or anything... but where it says "error" its supposed to say "error 30"

EDIT: i just found the edit button! XDXDXD
Reply
#3

you bad finisch the script
Reply
#4

It said it started on line 4071, I need to take a look in the scripting below that since that's not the whole OnDialogResponse thing.
Reply
#5

probly is a return ...
Reply
#6

format(message, 256, "You selected Sunt 1, And got teleported to there!", listitem

I don't know of you completed this line correctly, or if this was a cause of your error, but this line should be something like this ( note --> %d )

format(message, sizeof(message), "You selected Sunt %d, And got teleported to there!", listitem+1);
Reply
#7

pawn Код:
new message[257];
Tried that?
Reply
#8

ok.... i tried "new message[257];"

and that didn't work.... here is the entire "onDialogResponse"



Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2)
	{
		if(response)
		{
			new message[256+1];
			if(listitem == 0)
			{
			format(message, 256, "You selected Sunt 1, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
                SetVehiclePos(GetPlayerVehicleID(playerid), 2077.7571,-2544.5229,13.5469);
                ResetPlayerWeapons(playerid);
                }

                else {
                SetPlayerPos(playerid, 2077.7571,-2544.5229,13.5469);
        		ResetPlayerWeapons(playerid);
 			}
			if(listitem == 1)
			{
			format(message, 256, "You selected Stunt 2, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
                if (IsPlayerInAnyVehicle(playerid)) {
				SetPlayerVirtualWorld(playerid, 0);
				SetVehiclePos(GetPlayerVehicleID(playerid), -1657.1282,-164.1566,14.1484);
                ResetPlayerWeapons(playerid);
                }

                else {
                SetPlayerPos(playerid, -1657.1282,-164.1566,14.1484);
				ResetPlayerWeapons(playerid);
 			}
			if(listitem == 2)
			{
			format(message, 256, "You selected Stunt 3, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
				SetPlayerPos(playerid, 2505.037109, -1667.181396, 13.370160);
				SetPlayerFacingAngle(playerid, 90.719528);
 			}
			if(listitem == 3)
			{
			format(message, 256, "You selected Big Jump, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 1541.3324,-1365.4460,329.7969);
 			}
			if(listitem == 4)
			{
			format(message, 256, "You selected Los Santos Airport, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 1995.6874,-2656.5300,13.5469);
 			}
			if(listitem == 5)
			{
			format(message, 256, "You selected San Fierro Airport, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, -1728.3805,-364.0409,17.1406);
 			}
			if(listitem == 6)
			{
			format(message, 256, "You selected Las Venturas Airport, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
 			}
			if(listitem == 7)
			{
			format(message, 256, "You selected Monster Mash, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 696.1600,890.1372,-38.7767);
 			}
			if(listitem == 8)
			{
			format(message, 256, "You selected The Lonely Island Deathmatch, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 102);
				ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid,496.3541,-2863.0798,4.0339);
		SetPlayerFacingAngle(playerid,275.1259);
		GivePlayerWeapon(playerid,16,10);
        GivePlayerWeapon(playerid,24,500);
        GivePlayerWeapon(playerid,26,500);
        GivePlayerWeapon(playerid,25,300);
        GivePlayerWeapon(playerid,28,500);
        GivePlayerWeapon(playerid,34,100);
        GivePlayerWeapon(playerid,44,1);
        GivePlayerWeapon(playerid,45,1);
 			}
			if(listitem == 9)
   			{
			format(message, 256, "You selected Sky Dive, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 2587.8105,-1676.5101,782.1215);
		SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You Have Been Teleported To The Highest point on the map!!!");
		GivePlayerWeapon(playerid,46,1);
 			}
			if(listitem == 10)
			{
			format(message, 256, "You selected The Great Drain Race, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, 1410.9125,-1367.5869,8.5576);
		GameTextForPlayer(playerid,"~r~Welcome ~g~to the best race ever!!",5000,10);
 			}
			if(listitem == 11)
			{
			format(message, 256, "You selected The Hand War, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
                SetPlayerPos(playerid, 1355.6835,2153.9297,11.0156);
                SetPlayerHealth(playerid, 10);
 			}
			if(listitem == 12)
			{
			format(message, 256, "You selected Mini Gun Madness, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 299);
				ResetPlayerWeapons(playerid);
				SetPlayerPos(playerid, 659.9803,874.8065,-41.5015);
                GivePlayerWeapon(playerid, 38,500);
 			}
			if(listitem == 13)
			{
			format(message, 256, "You selected The Abandoned Airport, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
				SetPlayerPos(playerid, 400.7487,2447.9968,16.5000);
 			}
			if(listitem == 14)
			{
			format(message, 256, "You selected LV TP 1, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
                SetPlayerPos(playerid, 1484.5660,2198.1216,11.0234);
 			}
			if(listitem == 15)
			{
			format(message, 256, "You selected LV TP 2, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
                SetPlayerPos(playerid, 2327.5415,1394.1708,42.8203);
 			}
			if(listitem == 16)
			{
			format(message, 256, "You selected LV TP 3, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
				SetPlayerPos(playerid, 2025.5162,1919.4929,12.3383);
 			}
			if(listitem == 17)
			{
			format(message, 256, "You selected LV TP 4, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				ResetPlayerWeapons(playerid);
                SetPlayerPos(playerid, 2152.7285,995.5238,10.8203);
 			}
			if(listitem == 18)
			{
			format(message, 256, "You selected The Way To God, And got teleported to there!", listitem);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
				SetPlayerPos(playerid, 239.2802,1561.3365,586.2000);
				SetPlayerFacingAngle(playerid, 74.9583);
 			}
			if(listitem == 19)
			{
			format(message, 256, "You selected The Way To Death, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
	    		SetPlayerPos(playerid, 996.6433,2787.8489,1067.7532);
				SetPlayerFacingAngle(playerid, 90.0000);
 			}
			if(listitem == 20)
			{
			format(message, 256, "You selected The Deadly Jump, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
				SetPlayerVirtualWorld(playerid, 0);
				ResetPlayerWeapons(playerid);
		    	SetPlayerPos(playerid, -673.3708,-3024.7944,705.3344);
 			}
			if(listitem == 21)
			{
			format(message, 256, "You selected Los Santos Police Department, And got teleported to there!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
 			}
			if(listitem == 22)
			{
	  		format(message, 256, "You selected Unity Station, And got teleported to there!", listitem);
  			SendClientMessage(playerid, 0xFFFFFFFF, message);
	  		SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
			}
	  		if(listitem == 23)
			{
				format(message, 256, "You selected The Car Lot, And got teleported to there!", listitem);
		  		SendClientMessage(playerid, 0xFFFFFFFF, message);
		SetPlayerVirtualWorld(playerid, 0);
		ResetPlayerWeapons(playerid);
		SetPlayerPos(playerid, -1967.0630,293.8740,35.3343);
		GameTextForPlayer(playerid,"~r~This is the SF Car-lot ~g~Feel free to go inside and choose a bike or car!!",5000,10);
	 	      return 1;
  			}
  if(dialogid == 3)
	{
		if(response)
		{
			new message[256+1];
			if(listitem == 0)
			{
			format(message, 256, "You selected Pistol!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 24, 300);
		  	GivePlayerMoney(playerid, -400);
		  	}
			if(listitem == 1)
			{
			format(message, 256, "You selected Shotgun!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 25, 300);
		  	GivePlayerMoney(playerid, -550);
		  	}
			if(listitem == 2)
			{
			format(message, 256, "You selected Sawn-Off Shotgun!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 26, 250);
		  	GivePlayerMoney(playerid, -600);
			}
			if(listitem == 3)
			{
			format(message, 256, "You selected Combat Shotgun!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 27, 200);
		  	GivePlayerMoney(playerid, -700);
			}
			if(listitem == 4)
			{
			format(message, 256, "You selected AK 47!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 30, 300);
		  	GivePlayerMoney(playerid, -800);
			}
			if(listitem == 5)
			{
			format(message, 256, "You selected MP 5!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 29, 350);
		  	GivePlayerMoney(playerid, -900);
			}
			if(listitem == 6)
			{
			format(message, 256, "You selected Tec 9!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 32, 300);
		  	GivePlayerMoney(playerid, -500);
			}
			if(listitem == 7)
			{
			format(message, 256, "You selected Sniper Rifle!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 34, 100);
		  	GivePlayerMoney(playerid, -1500);
			}
			if(listitem == 8)
			{
			format(message, 256, "You selected A Parachute! Here's a extra one for free! They are free when you go skydiving too!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	GivePlayerWeapon(playerid, 46, 2);
		  	GivePlayerMoney(playerid, -200);
			}
			if(listitem == 9)
			{
			format(message, 256, "You selected Health!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	SetPlayerHealth(playerid, 100);
		  	GivePlayerMoney(playerid, -300);
			}
			if(listitem == 3)
			{
			format(message, 256, "You selected Armour!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
		  	SetPlayerArmour(playerid, 100);
		  	GivePlayerMoney(playerid, -300);
			}
			return 1;
 	  }
	}
	return 0;
}



Hope this helps in helping me!
Reply
#9

@ Hiddos I tried "new message[257]" and it didn't do anything different....
Reply
#10

please help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)