SA-MP Forums Archive
Dialogs Conflict with other Dialogs with different... - 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: Dialogs Conflict with other Dialogs with different... (/showthread.php?tid=117722)

Pages: 1 2


Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

...unique identifiers

This has been happening when I have 2 or more dialogs, It conflicts with the first dialog...

http://pastebin.com/m4c4c836b


The first Dialog is teleports, and the second one is a shop mode with a checkpoint upon entering..

When you enter the checkpoint the weapons dialog loads fine but when you click on one of them, the function uses the first response from the teleport dialog.


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

TELES+2? WEAPONS? Are the same...


Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

Quote:
Originally Posted by Merlо
TELES+2? WEAPONS? Are the same...
What?


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

Quote:
Originally Posted by HydraX
Quote:
Originally Posted by Merlо
TELES+2? WEAPONS? Are the same...
What?
When you're using TELES+2 is the same thing that WEAPONS, the same dialogid.


Re: Dialogs Conflict with other Dialogs with different... - SpiderPork - 01.01.2010

He's right:

pawn Code:
if(listitem == 1) // Airports/Aeroplane's
{
   ShowPlayerDialog(playerid, TELES+2, DIALOG_STYLE_LIST, "Teleport to", "Francis Intn'l Airport - Ticket sales\nFrancis Intn'l Airport - Baggage claim\nShamal cabin\nAndromada cargo hold\nBack", "Select", "Cancel");
}



Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

So Do i need to change the WEAPONS to a different ID?


Re: Dialogs Conflict with other Dialogs with different... - SpiderPork - 01.01.2010

I'd recommend you change it to a bit higher one.


Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

Quote:
Originally Posted by SpiderPork
I'd recommend you change it to a bit higher one.
#define TELES 2 //Will be kept the same
#define WEAPONS 4 //maybe change to 30?

Would 30 be enough?


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

Define all teles and weapons id's, as:

#define TELES1 2
#define TELES2 3
...

#define WEAPONS1 11
#define WEAPONS2 12
...



Re: Dialogs Conflict with other Dialogs with different... - SpiderPork - 01.01.2010

Quote:
Originally Posted by HydraX
Quote:
Originally Posted by SpiderPork
I'd recommend you change it to a bit higher one.
#define TELES 2 //Will be kept the same
#define WEAPONS 4 //maybe change to 30?

Would 30 be enough?
30 would be enough, yes.


Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

Quote:
Originally Posted by Merlо
Define all teles and weapons id's, as:

#define TELES1 2
#define TELES2 3
...

#define WEAPONS1 11
#define WEAPONS2 12
...
can they be any number or do they have to be in order? That's the part that confuses me the most.


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

Quote:
Originally Posted by SpiderPork
Quote:
Originally Posted by HydraX
Quote:
Originally Posted by SpiderPork
I'd recommend you change it to a bit higher one.
#define TELES 2 //Will be kept the same
#define WEAPONS 4 //maybe change to 30?

Would 30 be enough?
30 would be enough, yes.
Enough? Yes. But if he add or remove a dialog, will be better define one by one.


Re: Dialogs Conflict with other Dialogs with different... - Cezar - 01.01.2010

Quote:
Originally Posted by HydraX
Quote:
Originally Posted by Merlо
Define all teles and weapons id's, as:

#define TELES1 2
#define TELES2 3
...

#define WEAPONS1 11
#define WEAPONS2 12
...
can they be any number or do they have to be in order? That's the part that confuses me the most.
They don't HAVE to be in order but there's no reason why they shouldn't. In my latest script I have about 30 dialogs and they are defined in ascending order. They work perfectly.


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

Quote:
Originally Posted by HydraX
Quote:
Originally Posted by Merlо
Define all teles and weapons id's, as:

#define TELES1 2
#define TELES2 3
...

#define WEAPONS1 11
#define WEAPONS2 12
...
can they be any number or do they have to be in order? That's the part that confuses me the most.
Don't need to be in order, just need to be different.


Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

I did what merlo said but now I'm getting...

pawn Код:
C:\Users\Stunt Paradise\Desktop\SAMP R4\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
C:\Users\Stunt Paradise\Desktop\SAMP R4\pawno\include\Seifader.inc(71) : warning 203: symbol is never used: "reason"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(434) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(693) : error 017: undefined symbol "WEAPONS"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(909) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(915) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(919) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(923) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(927) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(931) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(935) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(939) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(943) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(947) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(958) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1006) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1012) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1038) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1044) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1085) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1091) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1132) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1138) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1249) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1255) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1296) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1302) : error 017: undefined symbol "TELES"
C:\Users\Stunt Paradise\Desktop\SAMP R4\gamemodes\SPV4.pwn(1318) : error 017: undefined symbol "TELES"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
The first 2 warnings can be ignored..


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

Paste the code again.


Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

http://pastebin.com/d5c36cd10


Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

You must replace TELES+1,2,3... with the correct define name, as you defined TELES1, replace TELES+1 with TELES1, replace TELES+2 with TELES2, all them.


Re: Dialogs Conflict with other Dialogs with different... - HydraX - 01.01.2010

Example: Something like this?

pawn Код:
#define TELES1 2
#define ....
pawn Код:
if(dialogid == TELES1) // 24/7's
    {
        if(response)
        {
            if(listitem == 0) // Abandon Airport
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, 398.6381,2442.1099,16.5000);
            format(string, sizeof(string), "[TELEPORT] %s [/AA]", pName);
            SendClientMessageToAll(COLOR_YELLOW, string);
            }
...............



Re: Dialogs Conflict with other Dialogs with different... - MerLow - 01.01.2010

Yes.