OnDialogResponse Already defined
#1

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!
Reply
#2

Sorry for the bump but this is big stump preventing me from progressing on the script
Reply
#3

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

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=45235



Did you type Forward OnPlayerDialogResponse(babla) at the begin of your script? If yes, remove it.
Nope
Reply
#5

Show us the code, but it looks like (from what I see) that you have added the whole callback for each dialog..
Reply
#6

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

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

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.
Reply
#9

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

It should work, try removing the - from CS-DM ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)