Dialog Problem help me :
#1

Hey ther'es problem at this Dialog error's : Here's the CMD try fix it please I couldn't :

Dialog :

Код:
ShowCrateGunMenu
{
	    if(response)
	    {
	        if(PlayerInfo[playerid][pConnectHours] < 2 || PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!");
			switch(listitem)
			{ //Desert Eagle\nSPAS-12\nMP5\nM4A1\nAK-47\nSniper Rifle\nShotgun
			    Deagle - 4
				Spas - 8
				AK-47 - 5
				M4    - 6
				Sniper Rifle - 5
				MP5 - 5

			    case 0: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 24, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 1: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 27, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 2: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 29, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 3: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 31, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 4: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 30, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 5: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 34, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
				case 6: // CRATE GUNS
				{
					GivePlayerValidWeapon(playerid, 25, 99999);
					CrateInfo[CrateID][GunQuantity]--;
				}
			}
			format(string, sizeof(string), "Serial Number: %d\nCapacity: %d/50", CrateID, CrateInfo[CrateID][GunQuantity]);
			UpdateDynamic3DTextLabelText(CrateInfo[CrateID][crLabel], COLOR_ORANGE, string);
	    }
	}
Error's :
Код:
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4822) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4823) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4825) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4826) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4835) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4837) : error 021: symbol already defined: "GivePlayerValidWeapon"
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4840) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4842) : error 021: symbol already defined: "GivePlayerValidWeapon"
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4845) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4847) : error 021: symbol already defined: "GivePlayerValidWeapon"
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4850) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4852) : error 021: symbol already defined: "GivePlayerValidWeapon"
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4855) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4857) : error 021: symbol already defined: "GivePlayerValidWeapon"
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4860) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4862) : error 021: symbol already defined: "GivePlayerValidWeapon"
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4865) : error 010: invalid function or declaration
d:\Users\User\Desktop\Updated Script\IC-RP.pwn(4867) : error 021: symbol already defined: "GivePlayerValidWeapon"
Reply
#2

Are you putting that under "OnDialogResponse"? If not, you should do it
Reply
#3

Show GivePlayerValidWeapon function code
Reply
#4

What do U mean ?
Reply
#5

The GivePlayerValidWeapon is created twice in 2 different ways!
Check your script for the stock/callback
Reply
#6

Код:
GivePlayerValidWeapon( playerid, WeaponID, Ammo )
{
	if((PlayerInfo[playerid][pConnectTime] < 2 || PlayerInfo[playerid][pWRestricted] > 0) && WeaponID != 46 && WeaponID != 43) return 1;
	switch( WeaponID )
	{
		case 0, 1:
		{
			PlayerInfo[playerid][pGuns][ 0 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 2, 3, 4, 5, 6, 7, 8, 9:
		{
			PlayerInfo[playerid][pGuns][ 1 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 22, 23, 24:
		{
			PlayerInfo[playerid][pGuns][ 2 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 25, 26, 27:
		{
			PlayerInfo[playerid][pGuns][ 3 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 28, 29, 32:
		{
			PlayerInfo[playerid][pGuns][ 4 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 30, 31:
		{
			PlayerInfo[playerid][pGuns][ 5 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 33, 34:
		{
			PlayerInfo[playerid][pGuns][ 6 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 35, 36, 37, 38:
		{
			PlayerInfo[playerid][pGuns][ 7 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 16, 17, 18, 39, 40:
		{
			PlayerInfo[playerid][pGuns][ 8 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 41, 42, 43:
		{
			PlayerInfo[playerid][pGuns][ 9 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 10, 11, 12, 13, 14, 15:
		{
			PlayerInfo[playerid][pGuns][ 10 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
		case 44, 45, 46:
		{
			PlayerInfo[playerid][pGuns][ 11 ] = WeaponID;
			GivePlayerWeapon( playerid, WeaponID, Ammo );
		}
	}
	return 1;
}
Here's that what to change ?
Reply
#7

You have defined GivePlayerValidWeapon twice.
Reply
#8

What do U mena ? What should I do ?
Reply
#9

pawn Код:
Deagle - 4
                Spas - 8
                AK-47 - 5
                M4    - 6
                Sniper Rifle - 5
                MP5 - 5
Did you add that when you posted to show us or you've got that to your script? Because if you do, it's incorrect and you need to add it to a commented
pawn Код:
/* text */
OR
pawn Код:
// text
Reply
#10

That's scripted the M4 . Sniper , MP5 ///... So ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)