Help me in panwo errors
#1

I got some errors in panwo:
Код:
C:\Users\Fidfda\Desktop\dsd (10)\filterscripts\Toll.pwn(247) : error 035: argument type mismatch (argument 2)
C:\Users\Fidfda\Desktop\dsd (10)\filterscripts\Toll.pwn(249) : error 017: undefined symbol "params"
C:\Users\Fidfda\Desktop\dsd (10)\filterscripts\Toll.pwn(250) : error 017: undefined symbol "sendername"
C:\Users\Fidfda\Desktop\dsd (10)\filterscripts\Toll.pwn(250) : error 017: undefined symbol "sendername"
C:\Users\Fidfda\Desktop\dsd(10)\filterscripts\Toll.pwn(250) : error 029: invalid expression, assumed zero
C:\Users\Fidfda\Desktop\dsd (10)\filterscripts\Toll.pwn(250) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


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

#include <a_samp>
#include <ZCMD>
#include <sscanf2>
#include <streamer>

#define endif
#define MAX_OOCSHOP 1000
#define DIALOG_OOCSHOP 32546

#define COLOR_GREY		0x333333
#define COLOR_WHITE			0xFFFFFF

enum pInfo
{
	pGoldBars,
	pDonateRank,
	pGarageTicket,
	pRPBoost,
	pHouseTicket,
	pBusinessTicket,
	pVehicleTicket,
	pGateTicket,
	pBong,
	pPaper,
	pCrack,
	pPipe,
	pPot,
	pMats
}
new PlayerInfo[MAX_PLAYERS][pInfo];

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" DS");
	print("--------------------------------------\n");
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_OOCSHOP)
	{
		if(response)
		{
			if(listitem == 0)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 5)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought an exta level up Boost - It will last for 1 Hour");
					PlayerInfo[playerid][pRPBoost] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -5;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 1)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 20)
				{
					SendClientMessage(playerid, COLOR_WHITE,"You have bought Bronze VIP Status - It will last for 1 Month");
					PlayerInfo[playerid][pDonateRank] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -20;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 2)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 40)
				{
					SendClientMessage(playerid, COLOR_WHITE,"You have bought Silver VIP Status - It will last for 1 Month");
					PlayerInfo[playerid][pDonateRank] = 2;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -40;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 3)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 70)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought Gold VIP Status - It will last for 1 Month ");
					PlayerInfo[playerid][pDonateRank] = 3;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -70;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 4)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 100)
				{
					SendClientMessage(playerid, COLOR_WHITE,"You have bought Platinium VIP Status - It will last for 1 Month");
					PlayerInfo[playerid][pDonateRank] = 4;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -100;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 5)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 25)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom House Ticket - Request it from any Admin using /report");
					PlayerInfo[playerid][pHouseTicket] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -25;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 6)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 50)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom Business Ticket - Request it from any Admin using /report");
					PlayerInfo[playerid][pBusinessTicket] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -50;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 7)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 25)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom Vehicle Ticket - Request it from any Admin using /report");
					PlayerInfo[playerid][pVehicleTicket] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -25;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 8)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 25)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom Garage Ticket - Request it from any Admin using /report");
					PlayerInfo[playerid][pGarageTicket] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -25;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 9)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 20)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom Gate Ticket - Request it from any Admin using /report");
					PlayerInfo[playerid][pGateTicket] = 1;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -20;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 10)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 2)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have purchased an HP refill.");
					SetPlayerHealth(playerid, 100);
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -2;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 11)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 2)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have purchased an Armor refill.");
					SetPlayerArmour(playerid, 100);
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -2;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 12)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 15)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have purchased 5 pieces of Paper/Bong/Pipes/Pot/Crack.");
					PlayerInfo[playerid][pBong] = PlayerInfo[playerid][pBong] += 5;
					PlayerInfo[playerid][pBong] = PlayerInfo[playerid][pPaper] += 5;
					PlayerInfo[playerid][pBong] = PlayerInfo[playerid][pPipe] += 5;
					PlayerInfo[playerid][pBong] = PlayerInfo[playerid][pPot] += 5;
					PlayerInfo[playerid][pBong] = PlayerInfo[playerid][pCrack] += 5;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -15;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
				}
			}
			if(listitem == 13)
			{
				if(PlayerInfo[playerid][pGoldBars] >= 20)
				{
					SendClientMessage(playerid , COLOR_WHITE,"You have purchased 700 G-Parts [Gun Parts]");
					PlayerInfo[playerid][pBong] = PlayerInfo[playerid][pMats] += 700;
					PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -20;
				}
				else
				{
					SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
					PlayerInfo[playerid][pGoldBars] = 0;
				}
			}
		}
		return 1;
	}
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp("/oocshop", true) == 0)
	{
		#pragma unused params;
		GetPlayerName(playerid, sendername, sizeof(sendername));
		for(new i = 0; i < sizeof(OOCshopInfo); i++)
		{
			if(IsPlayerInRangeOfPoint(playerid, 3.0, OOCshopInfo[i][OOCshopX], OOCshopInfo[i][OOCshopY], OOCshopInfo[i][OOCshopZ]))
			{
				ShowPlayerDialog(playerid, DIALOG_OOCSHOP, DIALOG_STYLE_LIST,"OOC Shop Items","EXP Boost - 5 Gold Bars\nBronze VIP - 20 Gold Bar\nSilver VIP - 40 Gold Bar\nGold VIP - 70 Gold Bar\nPlatinum VIP - 100 Gold Bar\nCustom House Ticket - 25 Gold Bar\nCustom Biz Ticket - 50 Gold Bar\nCustom Car Ticket - 25 Gold Bar\nCustom Garage Ticket - 25 Gold bar\nCustom Gate Ticket - 20 Gold Bar\nFull HP - 2 Gold Bars\nFull Armor - 2 Gold Bars\n5 B/P/P/P/C - 15 Gold Bars\n700 GP - 20 Gold Bar","Purchase","Cancel");
				return 1;
			}
		}
		SendClientMessage(playerid,COLOR_WHITE,".:: Error : You are not near an OOC Shop");
		return 1;
	}
	if(!strcmp("/deleteshop", true) == 0)
	{
		new id, string[128], FileName[128];
		if( sscanf( params, "d", id) )
		{
			if (IsPlayerAdmin(playerid))
			{
				SendClientMessage( playerid, COLOR_WHITE, "USAGE: /deleteOOCshop [OOCshopid]" );
			}
		}
		else
		{
			if( PlayerInfo[playerid][pAdmin]
			{
				format( string, sizeof( string ), "OOCshops/OOCshop_%d.ini", id);
				if(!fexist( string) )
				{
					SendClientMessage( playerid, COLOR_GREY, "Invalid OOCshop ID!" );
					return 1;
				}
				else
				{
					OOCshopInfo[id][OOCshopX] = 0;
					OOCshopInfo[id][OOCshopY] = 0;
					OOCshopInfo[id][OOCshopZ] = 0;
					OOCshopInfo[id][OOCshopAngle] = 0;
					DestroyDynamicObject(OOCshopInfo[id][OOCshopObjectID]);
					DestroyDynamic3DTextLabel(OOCshop[id]);
					format(string, sizeof(string), "You have deleted the OOCshop (ID: %d).", id);
					SendClientMessage( playerid, COLOR_WHITE, string);
					format(FileName, sizeof(FileName), "OOCshops/OOCshop_%d.ini", id);
					dini_Remove(FileName);
					SpawnedOOCshop--;
				}
			}
		}
		return 1;
	}
	if(!strcmp("/createshop", true) == 0)
	{
		new Usage[128], string[128];
		if( sscanf( params, "s", Usage))
		{
			if( PlayerInfo[playerid][pAdmin] >= 1337)
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /createoocshop [name]" );
				SendClientMessage(playerid, COLOR_GREY, "Available Names: Exterior and Complete" );
			}
		}
		else
		{
			if (IsPlayerAdmin(playerid))
			{
				if(strcmp(Usage, "exterior", true) == 0)
				{
					PlayerInfo[playerid][OOCshopExterior]++;
					GetPlayerPos( playerid, PlayerInfo[playerid][dExtX], PlayerInfo[playerid][dExtY], PlayerInfo[playerid][dExtZ]);
					GetPlayerFacingAngle(playerid, PlayerInfo[playerid][dAngle]);
					format( string, sizeof( string ), "Exterior set! (X: %f, Y: %f, Z: %f, A: %f).", PlayerInfo[playerid][dExtX], PlayerInfo[playerid][dExtY], PlayerInfo[playerid][dExtZ], PlayerInfo[playerid][dAngle]);
					SendClientMessage( playerid, COLOR_WHITE, string);
				}
				if(strcmp(Usage, "complete", true) == 0)
				{
					if(PlayerInfo[playerid][OOCshopExterior] > 0)
					{
						new NewOOCshopID = SpawnedOOCshop+1;
						if(NewOOCshopID >= MAX_OOCSHOP)
						{
							SendClientMessage( playerid, COLOR_WHITE, "Too many OOCshops are currently spawned!");
						}
						format( string, sizeof( string ), "OOCshops/OOCshop_%d.ini", NewOOCshopID);
						if(dini_Exists(string))
						{
							SpawnedOOCshop++;
							format( string, sizeof( string ), "OOCshop (ID: %d) already exist!", NewOOCshopID);
							SendClientMessage( playerid, COLOR_GREY, string);
							SendClientMessage( playerid, COLOR_YELLOW, "Please try again by typing /createOOCshop complete" );
						}
						else
						{
							OOCshopInfo[NewOOCshopID][OOCshopX] = PlayerInfo[playerid][dExtX];
							OOCshopInfo[NewOOCshopID][OOCshopY] = PlayerInfo[playerid][dExtY];
							OOCshopInfo[NewOOCshopID][OOCshopZ] = PlayerInfo[playerid][dExtZ];
							OOCshopInfo[NewOOCshopID][OOCshopAngle] = PlayerInfo[playerid][dAngle];
							dini_Create(string);
							dini_FloatSet( string, "X", OOCshopInfo[NewOOCshopID][OOCshopX]);
							dini_FloatSet( string, "Y", OOCshopInfo[NewOOCshopID][OOCshopY]);
							dini_FloatSet( string, "Z", OOCshopInfo[NewOOCshopID][OOCshopZ]);
							dini_FloatSet( string, "Angle", OOCshopInfo[NewOOCshopID][OOCshopAngle]);
							PlayerInfo[playerid][OOCshopExterior]--;
							SpawnedOOCshop++;
							OOCshopInfo[NewOOCshopID][OOCshopObjectID] = CreateDynamicObject(2754, OOCshopInfo[NewOOCshopID][OOCshopX], OOCshopInfo[NewOOCshopID][OOCshopY], OOCshopInfo[NewOOCshopID][OOCshopZ]-0.1, 0, 0, OOCshopInfo[NewOOCshopID][OOCshopAngle],0,0,-1,250);
							format(string, sizeof(string), "{FFF1AF}(OOC shop ID : %d){C9FFAB}\nYou can Purchase OOC Items here by using /oocshop", NewOOCshopID);
							OOCshop[NewOOCshopID] = CreateDynamic3DTextLabel(string, COLOR_DCHAT, OOCshopInfo[NewOOCshopID][OOCshopX],
							OOCshopInfo[NewOOCshopID][OOCshopY], OOCshopInfo[NewOOCshopID][OOCshopZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0, 0,-1,-1, 100.0);
							SendClientMessage( playerid, COLOR_LIGHTBLUE, "Successfully created an OOC Shop!" );
							format(string, sizeof( string ), "You can now use /deleteOOCshop in any Case - OOC Shop ID : %d).", NewOOCshopID);
							SendClientMessage(playerid, COLOR_WHITE, string);
						}
					}
				}
			}
			else
			{
				SendClientMessage( playerid, COLOR_GREY, "You are not authorized to use this command!" );
			}
		}
		return 1;
	}
	return 1;
}
Reply
#2

Quote:
Originally Posted by Moleex
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/oocshop", true) == 0)
    {
        #pragma unused params;
Why do you do this?

pawn Код:
#pragma unused params;
Reply
#3

OMGGGGGGGGGGGGGGGGGGGGGG NEVER use #pragma unused params..NEVER!

params isnt even defined here o.O
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)