Should I change "ShowPlayerDialogEx" to "ShowPlayerDialog"?
#1

ShowPlayerDialogEx causes a crash in the compiler, idk why.
The define is...
Код:
// Anti Dialog ID spoofing
#define         ShowPlayerDialogEx(%0, %1, %2, %3, %4, %5, %6)              ShowPlayerDialog(%0, %1, %2, %3, %4, %5, %6) \
	SetPVarInt(%0, "dialog", %1)
stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[]) {
	SetPVarInt(playerid, "dialog", dialogid);
	ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);

	return 1;
}
What can I do to get rid of the crash? Change ShowPlayerDialogEx to ShowPlayerDialog?
Reply
#2

pawn Код:
#define ShowPlayerDialogEx(%0,%1,%2,%3,%4,%5,%6) ShowPlayerDialog(%0, %1, %2, %3, %4, %5, %6); \
    SetPVarInt(%0, "dialog", %1)
First stop putting random spaces in your macros. Second, the parameters of the "function" you're making in the macro may not have spaces between them. Lastly, you need a semicolon at the end of your first statement if you plan to have more.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)