NGRP Latest Script Error's
#1

Код:
C:\Users\pc1\Desktop\Next Generation Gaming\pawno\include\./commands.pwn(20571) : warning 202: number of arguments does not match definition
C:\Users\pc1\Desktop\Next Generation Gaming\pawno\include\./commands.pwn(20872) : warning 202: number of arguments does not match definition
C:\Users\pc1\Desktop\Next Generation Gaming\pawno\include\./commands.pwn(20909) : warning 202: number of arguments does not match definition
C:\Users\pc1\Desktop\Next Generation Gaming\pawno\include\./commands.pwn(20967) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.

Код:
CMD:park(playerid, params[])
{
	new
		iVehicle = GetPlayerVehicleID(playerid),
		iBusiness = GetCarBusiness(iVehicle),
		Float: XYZ[4];

    if(iVehicle == GetPVarInt(playerid, "RentedVehicle"))
	{
	    new Float:x, Float:y, Float:z, Float:health;
		GetVehicleHealth(iVehicle, health);
  		if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessageEx(playerid, COLOR_GREY, "You must be in the driver seat.");
		if(health < 800) return SendClientMessageEx(playerid, COLOR_GREY, " Your vehicle is too damaged to park it.");
		if(PlayerInfo[playerid][pLockCar] == GetPlayerVehicleID(playerid)) PlayerInfo[playerid][pLockCar] = INVALID_VEHICLE_ID;
		GetPlayerPos(playerid, x, y, z);

		SetTimerEx("ParkRentedVehicle", 1000, false, "iiifff", playerid, iVehicle, GetVehicleModel(iVehicle), x, y, z);
		SendClientMessageEx (playerid, COLOR_YELLOW, "Do not move to have your vehicle parked!");
		return 1;
	}
	if (iVehicle != 0 && iBusiness != INVALID_BUSINESS_ID)
	{
	 	if (iBusiness != PlayerInfo[playerid][pBusiness]) return SendClientMessageEx(playerid, COLOR_WHITE, "You're not authorized to park this vehicle.");
		new
			iSlot = GetBusinessCarSlot(iVehicle);

		GetVehiclePos(iVehicle, XYZ[0], XYZ[1], XYZ[2]);
		GetVehicleZAngle(iVehicle, XYZ[3]);

		Businesses[iBusiness][bParkPosX][iSlot] = XYZ[0];
		Businesses[iBusiness][bParkPosY][iSlot] = XYZ[1];
		Businesses[iBusiness][bParkPosZ][iSlot] = XYZ[2];
		Businesses[iBusiness][bParkAngle][iSlot] = XYZ[3];

		DestroyVehicle(Businesses[iBusiness][bVehID][iSlot]);
		Businesses[iBusiness][bVehID][iSlot] = CreateVehicle(Businesses[iBusiness][bModel][iSlot], Businesses[iBusiness][bParkPosX][iSlot], Businesses[iBusiness][bParkPosY][iSlot], Businesses[iBusiness][bParkPosZ][iSlot],
		Businesses[iBusiness][bParkAngle][iSlot], 0, 0, -1);

        SaveDealershipVehicle(iBusiness, iSlot); //////Error 1
		SendClientMessageEx(playerid, COLOR_WHITE, "You've parked this vehicle.");
		return 1;
	}
Код:
CMD:editcarprice(playerid, params[])
{
    if(PlayerInfo[playerid][pBusiness] == INVALID_BUSINESS_ID) {
		SendClientMessageEx(playerid, COLOR_GREY, "You don't own a business.");
	}
	else if(Businesses[PlayerInfo[playerid][pBusiness]][bType] != BUSINESS_TYPE_NEWCARDEALERSHIP && Businesses[PlayerInfo[playerid][pBusiness]][bType] != BUSINESS_TYPE_OLDCARDEALERSHIP) {
		SendClientMessageEx(playerid, COLOR_GREY, "You don't own a vehicle dealership.");
	}
	else if(!IsPlayerInRangeOfPoint(playerid, 5.0, Businesses[PlayerInfo[playerid][pBusiness]][bExtPos][0], Businesses[PlayerInfo[playerid][pBusiness]][bExtPos][1], Businesses[PlayerInfo[playerid][pBusiness]][bExtPos][2])) {
		SendClientMessageEx(playerid, COLOR_GREY, "You need to be standing near the dealership entrance.");
	}
	else if(PlayerInfo[playerid][pBusinessRank] < Businesses[PlayerInfo[playerid][pBusiness]][bMinSupplyRank]) {
		SendClientMessageEx(playerid, COLOR_GREY, "You aren't high enough rank to edit the car dealership.");
	}
	else {
		new vehicleid, amount;
		if(sscanf(params, "dd", vehicleid, amount)) {
			SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /editcarprice [VehicleID] [Price]");
		}
		else if(PlayerInfo[playerid][pBusiness] != GetCarBusiness(vehicleid)) {
			SendClientMessageEx(playerid, COLOR_GREY, "That vehicle is not part of your dealership.");
		}
		else if(amount < 0) {
			SendClientMessageEx(playerid, COLOR_GREY, "The price can't be set below 0");
		}
		else {

 			new
				iSlot = GetBusinessCarSlot(vehicleid),
				Message[128];

			Businesses[PlayerInfo[playerid][pBusiness]][bPrice][iSlot] = amount;
			format(Message, sizeof(Message), "%s For Sale | Price: $%s", GetVehicleName(Businesses[PlayerInfo[playerid][pBusiness]][bVehID][iSlot]), number_format(Businesses[PlayerInfo[playerid][pBusiness]][bPrice][iSlot]));
                        UpdateDynamic3DTextLabelText(Businesses[PlayerInfo[playerid][pBusiness]][bVehicleLabel][iSlot], COLOR_LIGHTBLUE, Message);
			format(Message, sizeof(Message), "%s price has been set to $%s", GetVehicleName(vehicleid), number_format(amount));
			SendClientMessageEx(playerid, COLOR_WHITE, Message);
			SaveDealershipVehicle(PlayerInfo[playerid][pBusiness], iSlot);////////error 2
		}
	}
	return 1;
}
Код:
CMD:deletecdveh(playerid, params[]) {
	if(PlayerInfo[playerid][pAdmin] >= 4) {

		new
		    iBusiness,
			iVehicle;

		if(sscanf(params, "ii", iBusiness, iVehicle )) {
			SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /deletecdveh [business ID] [model id]");
		}
		else if(Businesses[iBusiness][bType] != BUSINESS_TYPE_NEWCARDEALERSHIP && Businesses[iBusiness][bType] != BUSINESS_TYPE_OLDCARDEALERSHIP) {
			SendClientMessageEx(playerid, COLOR_GRAD2, "Business is not a car dealership!");
		}
		else if(iBusiness != GetCarBusiness(iVehicle)) {
			SendClientMessageEx(playerid, COLOR_GREY, "That vehicle isn't a dealership vehicle.");
		}
		else {

			new
				ID = GetBusinessCarSlot(iVehicle);

			if(Businesses[iBusiness][bVehID][ID] != INVALID_VEHICLE_ID) {
			    if(IsValidDynamic3DTextLabel(Businesses[iBusiness][bVehicleLabel][ID])) DestroyDynamic3DTextLabel(Businesses[iBusiness][bVehicleLabel][ID]);
                DestroyVehicle(Businesses[iBusiness][bVehID][ID]);
               	Businesses[iBusiness][bModel][ID] = 0;
				Businesses[iBusiness][bParkPosX][ID] = 0;
  				Businesses[iBusiness][bParkPosY][ID] = 0;
			   	Businesses[iBusiness][bParkPosZ][ID] = 0;
		   	 	Businesses[iBusiness][bParkAngle][ID] = 0;
		   	 	Businesses[iBusiness][bVehID][ID] = 0;
		   	 	Businesses[iBusiness][bPrice][ID] = 0;
		   	 	SaveDealershipVehicle(iBusiness, ID); ////////Error 3
	   	 		return 1;
       		}
			return SendClientMessageEx(playerid, COLOR_GREY, "The max number of vehicles for this business has been reached.");
		}
	}
	else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
	return 1;
}
Код:
CMD:createcdveh(playerid, params[]) {
	if(PlayerInfo[playerid][pAdmin] >= 4) {

		new
		    iBusiness,
			iVehicle,
			iColors[2];

		if(sscanf(params, "iiii", iBusiness, iVehicle, iColors[0], iColors[1])) {
			SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /createcdveh [business ID] [model id] [color 1] [color 2]");
		}
		else if(!(400 <= iVehicle <= 611)) {
			SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid model specified (model IDs start at 400, and end at 611).");
		}
		else if(IsATrain(iVehicle)) {
			SendClientMessageEx(playerid, COLOR_GREY, "Trains cannot be spawned during runtime.");
		}
		else if(!(0 <= iColors[0] <= 255 && 0 <= iColors[1] <= 255)) {
			SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid color specified (IDs start at 0, and end at 255).");
		}
		else if(Businesses[iBusiness][bType] != BUSINESS_TYPE_NEWCARDEALERSHIP && Businesses[iBusiness][bType] != BUSINESS_TYPE_OLDCARDEALERSHIP) {
			SendClientMessageEx(playerid, COLOR_GRAD2, "Business is not a car dealership!");
		}
		else {

			new
				Float: fVehPos[4], label[50];

			GetPlayerPos(playerid, fVehPos[0], fVehPos[1], fVehPos[2]);
			GetPlayerFacingAngle(playerid, fVehPos[3]);
			for (new i; i < MAX_BUSINESS_DEALERSHIP_VEHICLES; i++)
			{
				if (Businesses[iBusiness][bVehID][i] == 0) {
					Businesses[iBusiness][bVehID][i] = CreateVehicle(iVehicle, fVehPos[0], fVehPos[1], fVehPos[2], fVehPos[3], iColors[0], iColors[1], -1);
					VehicleFuel[Businesses[iBusiness][bVehID][i]] = 100.0;

					Businesses[iBusiness][bModel][i] = iVehicle;

				 	Businesses[iBusiness][bParkPosX][i] = fVehPos[0];
	  				Businesses[iBusiness][bParkPosY][i] = fVehPos[1];
				   	Businesses[iBusiness][bParkPosZ][i] = fVehPos[2];
			   	 	Businesses[iBusiness][bParkAngle][i] = fVehPos[3];

					format(label, sizeof(label), "%s For Sale | Price: $%s", GetVehicleName(Businesses[iBusiness][bVehID][i]), number_format(Businesses[iBusiness][bPrice][i]));
					Businesses[iBusiness][bVehicleLabel][i] = CreateDynamic3DTextLabel(label,COLOR_LIGHTBLUE,Businesses[iBusiness][bParkPosX][i], Businesses[iBusiness][bParkPosY][i], Businesses[iBusiness][bParkPosZ][i],8.0,INVALID_PLAYER_ID, Businesses[iBusiness][bVehID][i]);

					Businesses[iBusiness][DealershipVehStock][i] = 1;
					Vehicle_ResetData(Businesses[iBusiness][bVehID][i]);
					SaveDealershipVehicle(iBusiness, i);/////Error 4
					return 1;
				}
			}
			return SendClientMessageEx(playerid, COLOR_GREY, "The max number of vehicles for this business has been reached.");
		}
	}
Reply
#2

error line ?
Reply
#3

Find this Please

SaveDealershipVehicle(iBusiness, iSlot); //////Error 1
SaveDealershipVehicle(PlayerInfo[playerid][pBusiness], iSlot);////////error 2
SaveDealershipVehicle(iBusiness, ID); ////////Error 3
SaveDealershipVehicle(iBusiness, i);/////Error 4
Reply
#4

The script upon which you cannot fix (Edit: woops, wrong warning) insufficient argument warnings is also a script you shouldn't have or ask help for. It was not a released or open source script.
Reply
#5

First of all, this is an NGRP leaked script, which means, NOBODY can assist you, and secondly, they are warnings, not errors, you can ignore them and they wont affect your script, hope that helped you out.
Reply
#6

Post the SaveDealershipVehicle function, so we can understand which arguments the function are expecting.

Quote:
Originally Posted by Scaleta
Посмотреть сообщение
The script upon which you cannot fix (Edit: woops, wrong warning) insufficient argument warnings is also a script you shouldn't have or ask help for. It was not a released or open source script.
Who are you to tell people who can or can't be helped? It doesn't matter whose script it is, he's asking for help and if he provides relevant information he should be given advice/help to fix the problems.

You should sort your problems out at NGG with leaks rather than blame the people who use the leaked copies.

Quote:
Originally Posted by HyDrAtIc
Посмотреть сообщение
First of all, this is an NGRP leaked script
This isn't true, stop chatting crap.
Reply
#7

Ignore them. They wouldn't affect the way your script works.
Reply
#8

Quote:
Originally Posted by Calgon
Посмотреть сообщение
Post the SaveDealershipVehicle function, so we can understand which arguments the function are expecting.



Who are you to tell people who can or can't be helped? It doesn't matter whose script it is, he's asking for help and if he provides relevant information he should be given advice/help to fix the problems.

You should sort your problems out at NGG with leaks rather than blame the people who use the leaked copies.
I'm sure if your own software was leaked (if you had any, present or future) you wouldn't support those who asked why something wasn't working properly.

Quote:
Originally Posted by Calgon
Посмотреть сообщение
This isn't true, stop chatting crap.
Yes, this is code from the leaked script.

On the topic of his question, it does take two parameters so his problem most likely lies elsewhere or was modified beyond the original.
Reply
#9

Quote:
Originally Posted by Scaleta
Посмотреть сообщение
I'm sure if your own software was leaked (if you had any, present or future) you wouldn't support those who asked why something wasn't working properly.
So what? That doesn't make it against the rules for other people to support him, that's just your problem and to be completely honest as a previous NGRP developer I've seen all of the code I've written for them be leaked in the past by myself (and many others) so it really doesn't phase me, I'm used to it now. Brian doesn't care either. You probably haven't changed that much during your time at NGRP anyway.
Reply
#10

Quote:
Originally Posted by Calgon
Посмотреть сообщение
So what? That doesn't make it against the rules for other people to support him, that's just your problem and to be completely honest as a previous NGRP developer I've seen all of the code I've written for them be leaked in the past by myself (and many others) so it really doesn't phase me, I'm used to it now. Brian doesn't care either. You probably haven't changed that much during your time at NGRP anyway.
It doesn't make it against the rules, however, doing so is immoral from any perspective. Just because it's leaked doesn't mean people should take advantage of it and rename the script completely as they often do. You and Brian are only two developers out of the many of us that have worked on the script.

Anyway for the OP, you've obviously edited those functions from what they should do.

PS; you're better of learning by writing your own script instead of taking other scripts out there.

PSS; have fun with a messed up streamer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)