Jump to content
  • 0

Warning in dialog


R3muSGFX

Question

Problema intalnita: Am o functie "ShowErrorDialog" si se pare ca nu imi accepta sintaxa pe care am dat-o eu.

Warning: warning 202: number of arguments does not match definition

Linii cod:

ShowErrorDialog(playerid, "Nu poti cumpara mai multe masini. Maxim: %s" ,PlayerInfo[playerid][pOwnableVehicles]);

Ati incercat sa rezovlati singur: Da...

Imagine: nqgrsvibqsemerv05d83.png

 

Cum as putea sa trec acea informatie in acel dialog, daca se poate ? Sau ar trebui sa fac un dialog nou ?

 

Multumesc aniticipat.

qua8n0lrq5wl5v5xccbk.png
 
mf79y6bvavi9sp2qqfoi.png
Contact: Mail: [email protected]
Y!M: r3mus.onlypro
Skype: r3mus.onlypro
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Vezi daca ai facut definit bine functia "SendErrorDialog"

stock bool:Fals = false;

#define ShowErrorDialog(%0,%1,%2,%3)
	do{
		new string[3089];
                string[0] = EOS;
		format(string, sizeof(string), (%2), %3);
		ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "ERROR", string, "OK", "");
	}
	while(Fals)
Edited by KnowN
  • Upvote 2

242086.png

Link to comment
Share on other sites

  • 0
In primul rand, %s folosesti pentru nume iar %d pentru numere, in al doilea rand nu trebuie dupa mesaj sa adaugi doua butoane gen Close si OK sau doar OK sau doar Close sau doar cum vrei? :)) Si in al treilea rand, la final trebuie sa folosesti functia care arata cate masini poti detine, ownablevehicles nu arata masinile ce pot fi detinute?
  • Upvote 1
Link to comment
Share on other sites

  • 0

In primul rand, %s folosesti pentru nume iar %d pentru numere, in al doilea rand nu trebuie dupa mesaj sa adaugi doua butoane gen Close si OK sau doar OK sau doar Close sau doar cum vrei? :)) Si in al treilea rand, la final trebuie sa folosesti functia care arata cate masini poti detine, ownablevehicles nu arata masinile ce pot fi detinute?

Ce functie am facut eu, e functie de genu üniversala"nu doar pentru acel dialog.

In legatura cu %s, intradevar e %d, am gresit, motivele fiind din graba.

  • Upvote 1

242086.png

Link to comment
Share on other sites

  • 0

Am rezolvat pana la urma. Multumesc frumos pentru ajutor. Nu era problema de la %s chiar daca am gresit eu acolo :). ShowDialogError primeste doar 2 parametrii nu 3 cum am pus eu. Am folosit un string pentru afisarea textului.

 

Multumesc pentru ajutor tuturor !

qua8n0lrq5wl5v5xccbk.png
 
mf79y6bvavi9sp2qqfoi.png
Contact: Mail: [email protected]
Y!M: r3mus.onlypro
Skype: r3mus.onlypro
Link to comment
Share on other sites

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.