Filescript help! [+REP]
#1

Hello Scripters

I am a beginner and I just wanted to create a filescript for my server...I finished it but I got errors and warnings..:/

I AM A BEGINNED (NOOB)

How to fix them?

Here:
Код:
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(99) : warning 217: loose indentation
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(110) : warning 217: loose indentation
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(112) : warning 217: loose indentation
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(124) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(130) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(136) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(137) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(142) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(148) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(149) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(154) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(155) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(160) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(161) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(166) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(167) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(172) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(173) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(178) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(179) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(184) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(185) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(190) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(191) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(196) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(197) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(202) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(203) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(208) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(209) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(214) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(215) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(220) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(221) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(226) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(227) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(232) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(233) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(238) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(239) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(244) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(245) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(250) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(251) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(256) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(257) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(262) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(263) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(268) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(269) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(274) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(275) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(280) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(281) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(286) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(287) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(292) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(293) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(298) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(299) : warning 202: number of arguments does not match definition
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(302) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(302) : warning 215: expression has no effect
C:\Users\User\Desktop\h\filterscripts\buyguncmd.pwn(304) : error 030: compound statement not closed at the end of file (started at line 117)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Filescript:
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <a_players>

#define COLOR_YELLOW  0xFFFF00AA

#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()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	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("/buygun", cmdtext, true, 10) == 0)
 {
  ShowPlayerDialog(playerid,160,DIALOG_STYLE_LIST,"Weapon System [By Gregory]","Brass Knuckles\nGolf Club\nNightstick\nKnife\nBaseball Bat\nShovel\nSprayCan\nPool Cue\nKatana\nChainsaw\nDouble-ended Dildo\nDildo\nVibrator\nSilver Vibrator\nFlowers\nCane\nParachute\nTear Gas\n9mm\nSilenced 9mm\nDesert Eagle\nShoutgun\nCombat Shotgun\nMicro SMG/UZI\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Buy","Cancel");
  return 1;
 }
  if (strcmp("/prices", cmdtext, true, 10) == 0)
 {
SendClientMessage(playerid, COLOR_YELLOW, "___________________________________________________________________________");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}Brass Knuckles ({09FF00}25${FFFFF}) |  Golf Club ({09FF00}50${FFFFF}) | Nightstick ({09FF00}100${FFFFF}) | Knife ({09FF00}200${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}Baseball Bat ({09FF00}150${FFFFF}) | Shovel ({09FF00}100${FFFFF}) | SprayCan ({09FF00}500${FFFFF}) | Pool Cue ({09FF00}30${FFFFF}) | Katana ({09FF00}100${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}Chainsaw ({09FF00}1000${FFFFF}) | Double-ended Dildo ({09FF00}500${FFFFF}) | Dildo ({09FF00}450${FFFFF}) | Vibrator ({09FF00}300${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}Silver Vibrator ({09FF00}350${FFFFF}) | Flowers ({09FF00}10${FFFFF}) | Cane ({09FF00}30${FFFFF}) | Parachute ({09FF00}100${FFFFF}) | Tear Gas ({09FF00}1000${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}9mm ({09FF00}1500${FFFFF}) | Silenced 9mm ({09FF00}1600${FFFFF}) | Desert Eagle ({09FF00}3000${FFFFF}) | Shotgun ({09FF00}2800${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}Combat Shotgun ({09FF00}3500${FFFFF}) | Micro SMG/UZI ({09FF00}2500${FFFFF}) | MP5 ({09FF00}5000${FFFFF}) | AK-47 ({09FF00}4500${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "{FFFFF}M4 ({09FF00}5000${FFFFF}) | Tec-9 ({09FF00}3000${FFFFF}) | Country Rifle ({09FF00}6000${FFFFF}) | Sniper Rifle ({09FF00}7000${FFFFF})");
SendClientMessage(playerid, COLOR_YELLOW, "________________________________________________________");
  return 1;
 }
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 160)
	{
	    if(response)
	    switch(listitem)
	    {
	        case 0:
	        {
	        GivePlayerWeapon(playerid, 1);
	        ResetPlayerMoney(playerid, 25);
	        }
	        
	        case 1:
	        {
	        GivePlayerWeapon(playerid, 2);
			ResetPlayerMoney(playerid, 50);
			}
			
			case 3:
			{
			GivePlayerWeapon(playerid, 3);
			ResetPlayerMoney(playerid, 100);
			}
			
			case 4:
			{
			GivePlayerWeapon(playerid, 4);
			ResetPlayerMoney(playerid, 200);
			}
			
			case 5:
			{
			GivePlayerWeapon(playerid, 5);
			ResetPlayerMoney(playerid, 150);
			}
			
			case 6:
			{
			GivePlayerWeapon(playerid, 6);
			ResetPlayerMoney(playerid, 100);
			}
			
			case 7:
			{
			GivePlayerWeapon(playerid, 41);
			ResetPlayerMoney(playerid, 500);
			}
			
			case 8:
			{
			GivePlayerWeapon(playerid, 7);
			ResetPlayerMoney(playerid, 30);
			}
			
			case 9:
			{
			GivePlayerWeapon(playerid, 8);
			ResetPlayerMoney(playerid, 100);
			}
			
	        case 10:
			{
			GivePlayerWeapon(playerid, 9);
			ResetPlayerMoney(playerid, 1000);
			}
			
			case 11:
			{
			GivePlayerWeapon(playerid, 10);
			ResetPlayerMoney(playerid, 500);
			}
			
			case 12:
			{
			GivePlayerWeapon(playerid, 11);
			ResetPlayerMoney(playerid, 450);
			}
			
			case 13:
			{
			GivePlayerWeapon(playerid, 12);
			ResetPlayerMoney(playerid, 300);
			}

			case 14:
			{
			GivePlayerWeapon(playerid, 13);
			ResetPlayerMoney(playerid, 350);
			}
			
			case 15:
			{
			GivePlayerWeapon(playerid, 14);
			ResetPlayerMoney(playerid, 10);
			}
			
			case 16:
			{
			GivePlayerWeapon(playerid, 15);
			ResetPlayerMoney(playerid, 30);
			}
			
			case 17:
			{
			GivePlayerWeapon(playerid, 46);
			ResetPlayerMoney(playerid, 100);
			}
			
			case 18:
			{
			GivePlayerWeapon(playerid, 17);
			ResetPlayerMoney(playerid, 1000);
			}
			
			case 19:
			{
			GivePlayerWeapon(playerid, 22);
			ResetPlayerMoney(playerid, 1500);
			}
			
			case 20:
			{
			GivePlayerWeapon(playerid, 23);
			ResetPlayerMoney(playerid, 1600);
			}
			
			case 21:
			{
			GivePlayerWeapon(playerid, 24);
			ResetPlayerMoney(playerid, 3000);
			}
			
			case 22:
			{
			GivePlayerWeapon(playerid, 25);
			ResetPlayerMoney(playerid, 2800);
			}
			
			case 23:
			{
			GivePlayerWeapon(playerid, 27);
			ResetPlayerMoney(playerid, 3500);
			}
			
			case 24:
			{
			GivePlayerWeapon(playerid, 28);
			ResetPlayerMoney(playerid, 2500);
			}
			
			case 25:
			{
			GivePlayerWeapon(playerid, 29);
			ResetPlayerMoney(playerid, 5000);
			}
			
			case 26:
			{
			GivePlayerWeapon(playerid, 30);
			ResetPlayerMoney(playerid, 4500);
			}
			
			case 27:
			{
			GivePlayerWeapon(playerid, 31);
			ResetPlayerMoney(playerid, 5000);
			}
			
			case 28:
			{
			GivePlayerWeapon(playerid, 32);
			ResetPlayerMoney(playerid, 3000);
			}
			
			case 29:
			{
			GivePlayerWeapon(playerid, 33);
			ResetPlayerMoney(playerid, 6000);
			}
			
			case 30:
			{
			GivePlayerWeapon(playerid, 34);
			ResetPlayerMoney(playerid, 7000);
	    	return 1;
		}
	return 0;
}
Reply


Messages In This Thread
Filescript help! [+REP] - by Gogorakis - 17.11.2013, 20:08
Re: Filescript help! [+REP] - by Gogorakis - 17.11.2013, 20:22
Re: Filescript help! [+REP] - by StuartD - 17.11.2013, 20:27
Re: Filescript help! [+REP] - by Wizzy951 - 17.11.2013, 20:28
Re: Filescript help! [+REP] - by Gogorakis - 17.11.2013, 20:29
Re: Filescript help! [+REP] - by StuartD - 17.11.2013, 20:31
Re: Filescript help! [+REP] - by iPrivate - 17.11.2013, 20:31
Re: Filescript help! [+REP] - by Wizzy951 - 17.11.2013, 20:32
Re: Filescript help! [+REP] - by Gogorakis - 17.11.2013, 20:37

Forum Jump:


Users browsing this thread: 3 Guest(s)