Jump to content

Question

Posted

Problema intalnita (descriere): Am făcut comanda /givekey, dar am o eroare care îmi pune capac.
Ero(area / rile) / warning-(ul / urile): 

C:\Users\Dani\Desktop\xrev\samp03\gamemodes\vx-rp.pwn(6630) : error 028: invalid subscript (not an array or too many subscripts): "pCarModel"
C:\Users\Dani\Desktop\xrev\samp03\gamemodes\vx-rp.pwn(6630) : warning 215: expression has no effect
C:\Users\Dani\Desktop\xrev\samp03\gamemodes\vx-rp.pwn(6630) : error 001: expected token: ";", but found "]"
C:\Users\Dani\Desktop\xrev\samp03\gamemodes\vx-rp.pwn(6630) : error 029: invalid expression, assumed zero
C:\Users\Dani\Desktop\xrev\samp03\gamemodes\vx-rp.pwn(6630) : fatal error 107: too many error messages on one line


Liniile de cod / sursa / script-ul(obligatoriu): 

CMD:givekey(playerid, params[])
{
	new id,giveplayer[30],sendername[30],string[128];
	if(sscanf(params, "i", id)) return SCM(playerid, -1, "Syntax: /givekey [playerid]");
	if(HireCar[id] != -1) return SCM(playerid, COLOR_WHITE, "This player already has a pair of keys.");
	{
		if(ProxDetectorS(5.0, playerid, id))
		{
			if(HireCar[id] != -1) return SCM(playerid, COLOR_WHITE, "This player already has a set of key.");
			HireCar[id] = pCarModel[playerid];
			GetPlayerName(id, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "You have given %s the key to your vehicle", giveplayer);
			PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
			SendCliendMessage(playerid, COLOR_WHITE, string);
			format(string, sizeof(string), "You have recievede the key to a vehicle from %s", sendername);
			SendClientMessage(id, COLOR_WHITE, string);
			format(string, sizeof(string), "* %s takes out a set of keys and tosses them to %s.", sendername, giveplayer);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			SwtichKey[id]=2;	
		}
	}
	return 1;
}


Imagini / Video (optional): ------
Ati incercat sa rezolvati singur?: Da, din câtea am încercat să îmi dau seama la rândul cu pricina 

HireCar[id] = pCarModel[playerid];

în loc de pCarModel trebuie să pun variabila că detin masina...help me please.

4 answers to this question

Recommended Posts

  • 1
Posted

Salut,

nu cumva pCarModel este o variabila de tip enum?

Incearca:

HireCar[id] = PlayerInfo [ playerid ] [ pCarModel ] ;

Inlocuieste PlayerInfo cu denumirea matricii tale.

  • Upvote 2
  • 0
Posted

Pune functia care loadcars sau ceva sa vedem ce parametri ai

Dacă aș fii găsit-o mi-aș fi dat seama...e ceva ciudat la acest gamemode la care lucrez...însă sper să încerci să mă ajuți și așa.

  • 0
Posted

Salut,

nu cumva pCarModel este o variabila de tip enum?

Incearca:

HireCar[id] = PlayerInfo [ playerid ] [ pCarModel ] ;

Inlocuieste PlayerInfo cu denumirea matricii tale.

Mulțumesc frumos, +1.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.