Your way in handling dialogs - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Your way in handling dialogs (
/showthread.php?tid=182644)
Your way in handling dialogs - [L3th4l] - 11.10.2010
Ok, i got about 50 - 60 dialogs in my script. I'm tired of keeping track of every dialog id, and sometimes my dialogs conflict one another.
So, what is your method in keeping control of dialogs, and not make them conflict against?
Thanks!
Re: Your way in handling dialogs -
iFriSki - 11.10.2010
Commenting each and every bracket, defining what it's opening and closing. And have a multi-line comment with each dialogid, then having text summarizing it.
Re: Your way in handling dialogs -
bigcomfycouch - 11.10.2010
Use macros to keep track of your dialogues' IDs
Re: Your way in handling dialogs -
General Abe - 12.10.2010
Define it all.
pawn Код:
#define DIALOG_HEYITSADIALOG (32767) // max dialog number
ShowPlayerDialog(playerid, DIALOG_HEYITSADIALOG, DIALOG_STYLE_MSGBOX,"hey","it's a dialog!","okey","gtfo");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if(response) switch(dialogid) {
case DIALOG_HEYITSADIALOG: { <do your thang> }
}
return 1;
}