13.04.2017, 12:53
I get this errors when I try to define that function:
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : error 010: invalid function or declaration
../gamemode/factions/main.inc(229) : error 010: invalid function or declaration
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : warning 236: unknown parameter in substitution (incorrect #define pattern)
../gamemode/factions/main.inc(226) : error 010: invalid function or declaration
../gamemode/factions/main.inc(229) : error 010: invalid function or declaration
Код:
#define Dialog:%0(%1, %2, %3, %4) hook OnDialogResponse(%1, %0, %2, %3, %4) #define DIALOG_TEST 123 CMD:test(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_TEST, DIALOG_STYLE_MSGBOX, "Is working?", "Yes or not?", "Yes", "No"); return 1; } Dialog:DIALOG_TEST(playerid, response, listitem, inputtext[]) { if(!response) return SendClientMessage(playerid, COLOR_WHITE, "No"); SendClientMessage(playerid, COLOR_WHITE, "Yes"); return 1; }