PDA

View Full Version : [HELP] Trying to make a Car Selling System


Dobroski
02/08/2012, 04:52 PM
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 (c) 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.

Misiur
02/08/2012, 05:07 PM
PlayerInfo[playerid][pVeh] = PlayerInfo[seller[playerid]][pVeh];
//To
PlayerInfo[playerid][pVeh] = PlayerInfo[seller][pVeh];

Dobroski
02/08/2012, 05:12 PM
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!!! :cool: