Jump to content
  • 0

Erroare


VAurel

Question

Salut, am inceput de la un timp sa cer ajutor prea mult, se pare ca pauza asta mi-a stricat creierul :)) 

Deci, folosesc gm-ul lui NERS Side-Project, prima versiune, aceea de la care am inceput si eu gm-ul de la "0", am reusit sa adauga mai multe sisteme, etc, si cand am facut banca, mi-am dat seama dupa cateva zile ca la comanda /withdraw pot sa scot cat vreau eu din banca, nu aveam restrictie facuta. Am zis ok, o fac.

Faza este ca, nu merge, banii sunt stocati printr-o variabila. Folosind un include de BigInt, am incercat o varianta, dar primesc o erroare, nu mai dau de @NERSpe nicaieri, si din cate am inteles, el a editat putin include-ul de BigInt pentru a functiona.

Link GM

eroare

New-Santos.pwn(1925) : error 033: array must be indexed (variable "GetBigInt")

Linie Eroare : Comanda intreaga.

CMD:withdraw(playerid ,params[])
{
	new amount;
	if(IsInBank(playerid))
	{
		if(sscanf(params, "d", amount)) return sendUsage(playerid, "/withdraw <Amount of Money>");
		if(amount > 999999999) return sendError(playerid, "Nu puteti scoate mai mult de $999.999.999 din banca!");
		if(getBank(playerid) > amount) return sendError(playerid, "Nu detineti aceasta suma de bani in banca."); // Linia cu eroarea.
		removeBank(playerid, amount);
		giveCash(playerid, amount);
		SCMf(playerid, COLOR_WHITE, "You have withdrawn ($%s) from bank. New Balance : ($%s).", FormatNumber(amount),FormatBigInt(getBank(playerid)));
	}
	else
	{
		sendError(playerid, "Nu va aflati intr-o banca!");
	}
	return 1;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Sa inteleg ca functia getbank contine acel bigint? Pentru ca eroarea ta nu prea corespunde cu codul.

Ce as putea presupune e faptul ca GetBigInt este de fapt un array iar in scriptul tau se invoca fara index. Ex:

new GetBigInt[10];

new test = GetBigInt; // Incerci sa folosesti array fara a specifica un index

Edit: Am incercat sa explorez putin scriptul pe telefon si comanda originala e putin diferita. Din ce pot vedea exista o functie de comparatie pe care o poti folosi, presupun ca nu poti compara cum ai facut tu.

if(!CompareBigInt(pData[playerid][Bank2], pData[playerid][Bank], 0, params[0])) return sendError(playerid, "Nu detineti aceasta suma in banca");

  • Thanks 1
Link to comment
Share on other sites

  • 0
9 hours ago, Banditul said:

Sa inteleg ca functia getbank contine acel bigint? Pentru ca eroarea ta nu prea corespunde cu codul.

Ce as putea presupune e faptul ca GetBigInt este de fapt un array iar in scriptul tau se invoca fara index. Ex:

new GetBigInt[10];

new test = GetBigInt; // Incerci sa folosesti array fara a specifica un index

Edit: Am incercat sa explorez putin scriptul pe telefon si comanda originala e putin diferita. Din ce pot vedea exista o functie de comparatie pe care o poti folosi, presupun ca nu poti compara cum ai facut tu.

if(!CompareBigInt(pData[playerid][Bank2], pData[playerid][Bank], 0, params[0])) return sendError(playerid, "Nu detineti aceasta suma in banca");

Mersi pentru ajutor bro. Ti-am dat Thanks, chiar nu imi dadeam seama cum sa o rezolv...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.