Dialogs Conflict with other Dialogs with different...
#1

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

TELES+2? WEAPONS? Are the same...
Reply
#3

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

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

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");
}
Reply
#6

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

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

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

Define all teles and weapons id's, as:

#define TELES1 2
#define TELES2 3
...

#define WEAPONS1 11
#define WEAPONS2 12
...
Reply
#10

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

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

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

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

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

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

Paste the code again.
Reply
#17

http://pastebin.com/d5c36cd10
Reply
#18

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

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);
            }
...............
Reply
#20

Yes.
Reply


Forum Jump:


Users browsing this thread: 10 Guest(s)