SA-MP Forums Archive
Include editing question ? - 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: Include editing question ? (/showthread.php?tid=143762)



Include editing question ? - Mina - 24.04.2010


Is it possible to change name of OnDialogResponse to something else like OnDR.
I know one way and that is using pointer (in c++).

But is it possible to to so on Pawn ?
Or maybe by editing samp.inc ?




Re: Include editing question ? - [HiC]TheKiller - 24.04.2010

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  OnDR(playerid, dialogid, response, listitem, inputtext[]);
  return 1;
}

stock OnDR(playerid, dialogid, response, listitem, inputtext[])
{
 
  return 1;
}



Re: Include editing question ? - Mina - 24.04.2010

Quote:
Originally Posted by [HiC
TheKiller [Stuntp.com] ]
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  OnDR(playerid, dialogid, response, listitem, inputtext[]);
  return 1;
}

stock OnDR(playerid, dialogid, response, listitem, inputtext[])
{
 
  return 1;
}
oh thanks man
i really need it ;p

but is there any other way ?


Re: Include editing question ? - Correlli - 24.04.2010

Quote:
Originally Posted by [HiC
TheKiller [Stuntp.com] ]
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  OnDR(playerid, dialogid, response, listitem, inputtext[]);
  return 1;
}

stock OnDR(playerid, dialogid, response, listitem, inputtext[])
{
 
  return 1;
}
That will give you an error (error 029: invalid expression, assumed zero).

Correct:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  OnDR(playerid, dialogid, response, listitem, inputtext);
  return 1;
}

stock OnDR(playerid, dialogid, response, listitem, inputtext[])
{
  return 1;
}
But you can just do this:
pawn Код:
#define OnDR OnDialogResponse



Re: Include editing question ? - Mina - 24.04.2010

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by [HiC
TheKiller [Stuntp.com] ]
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  OnDR(playerid, dialogid, response, listitem, inputtext[]);
  return 1;
}

stock OnDR(playerid, dialogid, response, listitem, inputtext[])
{
 
  return 1;
}
That will give you an error (error 029: invalid expression, assumed zero).

Correct:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  OnDR(playerid, dialogid, response, listitem, inputtext);
  return 1;
}

stock OnDR(playerid, dialogid, response, listitem, inputtext[])
{
  return 1;
}
But you can just do this:
pawn Код:
#define OnDR OnDialogResponse
thanks Don Correlli
it seems yours is better .
but i want that all only because using npc callbacks with samp_a.inc...
that's why i'm asking how to change the name, yes just because that conflict.
but i think both ways not work for this propose ...