Include editing question ?
#1


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 ?

Reply
#2

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;
}
Reply
#3

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 ?
Reply
#4

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
Reply
#5

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 ...

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)