26.04.2014, 19:57
I'm hooking my callbacks according to this method: https://sampforum.blast.hk/showthread.php?tid=441293
Now, it seems to work perfectly fine ... just not for callbacks that have a string as a parameter. I'm getting the following error:
Code that's working fine:
Code that's not working due to having a string as a parameter:
Now, it seems to work perfectly fine ... just not for callbacks that have a string as a parameter. I'm getting the following error:
Код:
error 029: invalid expression, assumed zero
pawn Код:
public OnPlayerConnect(playerid) {
// My code here ...
#if defined my_OnPlayerConnect
my_OnPlayerConnect(playerid);
#endif
return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect my_OnPlayerConnect
#if defined my_OnPlayerConnect
forward my_OnPlayerConnect(playerid);
#endif
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
// My code here...
#if defined my_OnDialogResponse
my_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
#endif
return 1;
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
#define _ALS_OnDialogResponse
#endif
#define OnDialogResponse my_OnDialogResponse
#if defined my_OnDialogResponse
forward my_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
#endif