SA-MP Forums Archive
[HELP] Trying to make a Car Selling System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Trying to make a Car Selling System (/showthread.php?tid=365332)



[HELP] Trying to make a Car Selling System - Dobroski - 02.08.2012

Hi all.

In my mode, people can buy cars but they can't sell it to another players !

And I decided to make it can be sold to another players but I am getting some errors.


Код:
.pwn(9616) : error 028: invalid subscript (not an array or too many subscripts): "seller"
.pwn(9616) : warning 215: expression has no effect
.pwn(9616) : error 001: expected token: ";", but found "]"
.pwn(9616) : error 029: invalid expression, assumed zero
.pwn(9616) : fatal error 107: too many error messages on one line

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


4 Errors.
Well these are the errors. The 9616. line ( RED COLORED LINE) and system;

Код:
else if(!strcmp(params, "araba1", true))
	{
		new seller = ArabaSeller[playerid];
		if(seller == -1) return SendClientMessage(playerid, COLOR_GREY, "Hiз kimseeden Araba satım teklifi .");
		if(!IsPlayerNearPlayer(playerid, seller, 2)) return SendClientMessage(playerid, COLOR_GREY, "Buk .");
		if(ArabaPrice[seller][playerid] > PlayerInfo[playerid][pMoney]) return    SendClientMessage(playerid,COLOR_GREY, ".");
		GiveZaiatMoney(playerid, -ArabaPrice[seller][playerid]);
		GiveZaiatMoney(seller, ArabaPrice[seller][playerid]);
		PlayerInfo[playerid][pVeh] = PlayerInfo[seller[playerid]][pVeh];
		format(string, sizeof(string), "* %s aracını, %s adlı kişiye satış belgesini imzalar ve $%d alır", RPN(seller), RPN(playerid), ArabaPrice[seller][playerid]);
		SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
		format(string, sizeof(string), " Sen $%d karşılığında %s adlı kişinin 1. aracını satın aldın.", ArabaPrice[seller][playerid], RPN(seller));
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		format(string, sizeof(string), " %s adlı kişi $%d karşılığında senden 1. aracını satın aldı.", RPN(playerid), ArabaPrice[seller][playerid]);
		SendClientMessage(seller, COLOR_LIGHTBLUE, string);
		ArabaSeller[playerid] = -1;
		ArabaPrice[seller][playerid] = 0;
  	}
Well; what did I try to make? I wanted to make if player accepts the seller's offer; seller's car will be owned by player.

PlayerInfo[playerid][pVeh] = PlayerInfo[seller[playerid]][pVeh];

This. But It gives those errors.

Some information;

pVeh = player's vehicle

Please help me. Thank you.


Re: [HELP] Trying to make a Car Selling System - Misiur - 02.08.2012

pawn Код:
PlayerInfo[playerid][pVeh] = PlayerInfo[seller[playerid]][pVeh];
//To
PlayerInfo[playerid][pVeh] = PlayerInfo[seller][pVeh];



Re: [HELP] Trying to make a Car Selling System - Dobroski - 02.08.2012

Quote:
Originally Posted by Misiur
Посмотреть сообщение
pawn Код:
PlayerInfo[playerid][pVeh] = PlayerInfo[seller[playerid]][pVeh];
//To
PlayerInfo[playerid][pVeh] = PlayerInfo[seller][pVeh];
God bless you! I have nothing to say; thank you very very very much!!!