31.10.2011, 00:50
So I thought I had this working perfectly but apparently not, when I use dialogs in my gamemode with this included the server crashes.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid) {
case NRRADIO_DIALOG_ID:
{
if(response) {
new radioid = RadioIDFromDialogOrder(playerid, listitem);
RadioPlay(playerid, radioid);
format(nrTextString,sizeof(nrTextString),"[nRadio:] Stream for %s started.", RadioNameFromID(radioid));
SendClientMessage(playerid, 0xADD8E6FF, nrTextString);
}
else {
RadioInitDialog(playerid);
}
}
case NRCATEGORIES_DIALOG_ID:
{
if(response) {
RadioCategoryBrowse(playerid, listitem);
}
}
}
return CallLocalFunction("nradio_OnDialogResponse", "dddds", playerid, dialogid, response, listitem, inputtext);
}
#if defined _ALS_OnDialogResponse
#undef OnDialogResponse
#else
#define _ALS_OnDialogResponse
#endif
#define OnDialogResponse nradio_OnDialogResponse
forward nradio_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
Quote:
Originally Posted by crashdetect.log
[00:47:36]: The server has been crashed by native CallLocalFunction called at line 280 in file C:\Users\Administrator\Desktop\SA-MP Server\pawno\include\nradio.inc.
[00:47:36]: Backtrace (most recent call first): [00:47:36]: #0: OnDialogResponse (entry point) in file C:\Users\Administrator\Desktop\SA-MP Server\pawno\include\nradio.inc |