OnDialogResponse Already defined -
Darklom - 12.12.2010
Well I have this problem and only this one
Код:
OnDialogResponse already defined
I have it in two places, #1 on my first dialog, #2 on my second one but if I remove the second "OnDialogResponse" it'l cause a bunch of problems so I come forth and ask you guys for help!
Re: OnDialogResponse Already defined -
Darklom - 12.12.2010
Sorry for the bump but this is big stump preventing me from progressing on the script
Re: OnDialogResponse Already defined -
Biesmen - 12.12.2010
https://sampforum.blast.hk/showthread.php?tid=45235
Quote:
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.
|
Did you type Forward OnPlayerDialogResponse(babla) at the begin of your script? If yes, remove it.
Re: OnDialogResponse Already defined -
Darklom - 12.12.2010
Quote:
Originally Posted by Biesmen
|
Nope
Re: OnDialogResponse Already defined -
Joe_ - 12.12.2010
Show us the code, but it looks like (from what I see) that you have added the whole callback for each dialog..
Re: OnDialogResponse Already defined -
Darklom - 12.12.2010
Quote:
Originally Posted by Joe_
Show us the code, but it looks like (from what I see) that you have added the whole callback for each dialog..
|
I have, if I don't it'l cause a big mess
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DARKWEPS)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == CS-DM)
{
Did I mention I am working on my first script ever?
Re: OnDialogResponse Already defined -
WillyP - 12.12.2010
Quote:
Originally Posted by Darklom
I have, if I don't it'l cause a big mess
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DARKWEPS)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == CS-DM) {
Did I mention I am working on my first script ever?
|
Wanna medal?
You can't have 2 publics.
wiki.sa-mp.com/OnDialogResponse
Re: OnDialogResponse Already defined -
Joe_ - 12.12.2010
I wish you all luck on your script, and as for your problem..
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == CS-DM)
{
// Dialog code
}
else if(dialogid == DARKWEPS)
{
// Dialog code
}
return 0;
}
That should work fine, or somethings gone wrong somewhere else.
Re: OnDialogResponse Already defined -
Darklom - 12.12.2010
Quote:
Originally Posted by [FU]Victious
Wanna medal?
You can't have 2 publics.
wiki.sa-mp.com/OnDialogResponse
|
There's no reason to be an ass, I've just stated this is my first time scripting and I'm having trouble with dialogs!
Anyways here's my define
Код:
#define CS-DM 2003
#define DARKWEPS 1994
Re: OnDialogResponse Already defined -
Joe_ - 12.12.2010
It should work, try removing the - from CS-DM ?