Problem with DIALOG_STYLE_TABLIST
#1

I don't really know if this is bug or proper working but in my opinion, somebody from dev-team should look at this (code presented below is from "test_cmds").

Function (I cut "listitems" to 3 rows):
Код:
TabListHeadersDialogTest(playerid)
{
      new listitems[] = 
  	  "Deagle\t$5000\t100\n" \
	  "Sawnoff\t$5000\t100\n" \
	  "Pistol\t$1000\t50";

	  ShowPlayerDialog(playerid,2,DIALOG_STYLE_TABLIST,"Buy Weapon",listitems,"Select","Cancel");
}
And now everything works good, but what happens when I remove two columns from 3'rd row?
Код:
      new listitems[] = 
  	  "Deagle\t$5000\t100\n" \
	  "Sawnoff\t$5000\t100\n" \
	  "Pistol";
Nothing. Everything still works good. But what will happen when I do this same for first row?

Код:
      new listitems[] = 
  	  "Deagle\n" \
	  "Sawnoff\t$5000\t100\n" \
	  "Pistol\t$1000\t50";
Now I won't see other two columns for row 2 and 3 :/ To fix this just add "\t \t " to first row, but I don't think it is good solution. It should work differently :/
Reply
#2

Your question makes no sense, why aren't you using \t for tables on first row? Seeing as are columns which have to be filled, if you want to leave it empty you can try:

Код:
new listitems[] = 
  	  "Deagle\t \t \n" \
	  "Sawnoff\t$5000\t100\n" \
	  "Pistol\t$1000\t50";
Reply
#3

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Your question makes no sense, why aren't you using \t for tables on first row? Seeing as are columns which have to be filled, if you want to leave it empty you can try:
Check what i wrote at end of my first post. In my opinion it should act differently. It should at first, check max numbers of columns no matter if it's first or last row, and then display it for user.
Reply
#4

I think it doesn't motter
1'st row detect count of columbs
Reply
#5

Its obvious that will not work, because you aren't you using \t \t, the TABLIST dialog have a sctructure, and what you're trying to do on TABLIST is use it as a DIALOG_STYLE_LIST on the first row and use as a TABLIST at 2nd and 3rd, thats why i told you it makes no sense, if you don't want to follow the structure i think you have to use DIALOG_STYLE_LIST. What youre tring to can be compared as try to use DIALOG_STYLE_LIST and DIALOG_MSG_BOX at same dialog, will not work correctly and makes no sense...
Reply
#6

I didin't want to create another topic, so I ask here, anyone else getting any client crashes when using DIALOG_STYLE_TABLIST_HEADERS? Sometimes it works OK, and sometimes it crashes the client.
Reply
#7

Quote:
Originally Posted by T-N-Z
Посмотреть сообщение
I didin't want to create another topic, so I ask here, anyone else getting any client crashes when using DIALOG_STYLE_TABLIST_HEADERS? Sometimes it works OK, and sometimes it crashes the client.
Please post your code and the crash info that you're getting.
Reply
#8

Quote:
Originally Posted by dugi
Посмотреть сообщение
Please post your code and the crash info that you're getting.
Code:
Код:
#define     AMMUNATION_SMGS_DIALOG      "\
Weapon\tAmount\tPrice\n\
{FFFFFF}MP5\t90\t{FF0000}$3500\
"
ShowPlayerDialog(playerid,GUI_AMMUSMG,DIALOG_STYLE_TABLIST_HEADERS,"{FFFF00}SMGs",AMMUNATION_SMGS_DIALOG,"Buy", "Go Back");
Crash Report:
Код:
SA-MP 0.3.7-RC3
Exception At Address: 0x03FC5B6B
Base: 0x03F40000

Registers:
EAX: 0x00000000	EBX: 0x00000000	ECX: 0x00000000	EDX: 0x00000003
ESI: 0x072A99B8	EDI: 0x072A9A15	EBP: 0x00000055	ESP: 0x0028FC20
EFLAGS: 0x00210202

Stack:
+0000: 0x00000043   0x00000202   0x072A96B8   0x00000055
+0010: 0x03FC4CFC   0x00000202   0x00000043   0x00000055
+0020: 0x00000000   0x01F9033B   0x003306E6   0x00000000
+0030: 0x01F9033B   0x00000202   0x03F9CF42   0x003306E6
+0040: 0x00000202   0x00000000   0x01F9033B   0x03F9CD60
+0050: 0x00000202   0x0028FCB4   0x01F9033B   0x03F9CD60
+0060: 0x00000000   0x00000020   0x003306E6   0x74C88E71
+0070: 0x003306E6   0x00000202   0x00000000   0x01F9033B
+0080: 0x00000202   0xDCBAABCD   0x01F9033B   0x03F9CD60
+0090: 0x00000202   0x0028FD48   0x74C890D1   0x03F9CD60
+00A0: 0x003306E6   0x00000202   0x00000000   0x01F9033B
+00B0: 0xA4057C96   0x0028FE14   0x01EF4AC0   0x00000000
+00C0: 0x00000024   0x00000001   0x00000000   0x00000000
+00D0: 0x00000030   0xFFFFFFFF   0xFFFFFFFF   0x74C88FCE
+00E0: 0x00000000   0x00000000   0x03F9CD60   0x00000000
+00F0: 0xA4057CCA   0x01CD09F8   0x00000000   0x00000000
+0100: 0x00000001   0x00000000   0x003306E6   0xA4057C96
+0110: 0x00000000   0x0028F648   0x0028FDA4   0x74CBF160
+0120: 0xD0E51186   0x00000000   0x0028FDB4   0x74C8A66F
+0130: 0x03F9CD60   0x00000000   0x00000202   0x00000000
+0140: 0x01F9033B   0x00000000   0x00000001   0xA4057C6A
+0150: 0x00000001   0x0000000A   0x00000000   0x74C99D4D
+0160: 0x00000000   0x00000000   0x03F9CD60   0x00000000
+0170: 0x00000000   0x00000001   0x00000000   0x0028FD6C
+0180: 0x0028F648   0x0028FF70   0x74CBF160   0xD0E5277E
+0190: 0xFFFFFFFE   0x0028FDBC   0x74CB5D40   0x74C99F10
+01A0: 0x00748A82   0x0028FE14   0x755E8F60   0x00000000
+01B0: 0x0028FF80   0x7FFDE000   0x01700000   0x4F0C8D96
+01C0: 0x01701350   0x00000008   0x00000100   0x00000008
+01D0: 0x00000102   0x44700000   0x44070000   0x00000000
+01E0: 0x00000000   0x00000780   0x00000438   0x00000000
+01F0: 0x00000001   0x003306E6   0x00000202   0x00000000
+0200: 0x01F9033B   0x48278A3B   0x0000033B   0x000001F9
+0210: 0x0000002C   0x0028FE24   0x00825EA4   0x0028FF70
+0220: 0x754F30A5   0x00000000   0x7FFDE000   0x00821D17
+0230: 0x00835342   0xA58FAE79   0x0028FF80   0x008246F1
+0240: 0x00400000   0x00000000   0x01953F25   0x0000000A
+0250: 0x00000094   0x00000006   0x00000002   0x000023F0
+0260: 0x00000002   0x00000000   0x00000000   0x00000000
+0270: 0x00000000   0x00000000   0x00000000   0x00000000

SCM Op: 0x77E, lDbg: 0 LastRendObj: 3095

Game Version: US 1.0

State Information: Ped Context: 0
P0 (0,0)
As I said, sometimes it crashes, and sometimes it dosen't. I also tried without any formating or defining and I had same result.
Reply
#9

Quote:
Originally Posted by T-N-Z
Посмотреть сообщение
Code:
Код:
#define     AMMUNATION_SMGS_DIALOG      "\
Weapon\tAmount\tPrice\n\
{FFFFFF}MP5\t90\t{FF0000}$3500\
"
ShowPlayerDialog(playerid,GUI_AMMUSMG,DIALOG_STYLE_TABLIST_HEADERS,"{FFFF00}SMGs",AMMUNATION_SMGS_DIALOG,"Buy", "Go Back");
Crash Report:
Код:
SA-MP 0.3.7-RC3
Exception At Address: 0x03FC5B6B
Base: 0x03F40000

Registers:
EAX: 0x00000000	EBX: 0x00000000	ECX: 0x00000000	EDX: 0x00000003
ESI: 0x072A99B8	EDI: 0x072A9A15	EBP: 0x00000055	ESP: 0x0028FC20
EFLAGS: 0x00210202

Stack:
+0000: 0x00000043   0x00000202   0x072A96B8   0x00000055
+0010: 0x03FC4CFC   0x00000202   0x00000043   0x00000055
+0020: 0x00000000   0x01F9033B   0x003306E6   0x00000000
+0030: 0x01F9033B   0x00000202   0x03F9CF42   0x003306E6
+0040: 0x00000202   0x00000000   0x01F9033B   0x03F9CD60
+0050: 0x00000202   0x0028FCB4   0x01F9033B   0x03F9CD60
+0060: 0x00000000   0x00000020   0x003306E6   0x74C88E71
+0070: 0x003306E6   0x00000202   0x00000000   0x01F9033B
+0080: 0x00000202   0xDCBAABCD   0x01F9033B   0x03F9CD60
+0090: 0x00000202   0x0028FD48   0x74C890D1   0x03F9CD60
+00A0: 0x003306E6   0x00000202   0x00000000   0x01F9033B
+00B0: 0xA4057C96   0x0028FE14   0x01EF4AC0   0x00000000
+00C0: 0x00000024   0x00000001   0x00000000   0x00000000
+00D0: 0x00000030   0xFFFFFFFF   0xFFFFFFFF   0x74C88FCE
+00E0: 0x00000000   0x00000000   0x03F9CD60   0x00000000
+00F0: 0xA4057CCA   0x01CD09F8   0x00000000   0x00000000
+0100: 0x00000001   0x00000000   0x003306E6   0xA4057C96
+0110: 0x00000000   0x0028F648   0x0028FDA4   0x74CBF160
+0120: 0xD0E51186   0x00000000   0x0028FDB4   0x74C8A66F
+0130: 0x03F9CD60   0x00000000   0x00000202   0x00000000
+0140: 0x01F9033B   0x00000000   0x00000001   0xA4057C6A
+0150: 0x00000001   0x0000000A   0x00000000   0x74C99D4D
+0160: 0x00000000   0x00000000   0x03F9CD60   0x00000000
+0170: 0x00000000   0x00000001   0x00000000   0x0028FD6C
+0180: 0x0028F648   0x0028FF70   0x74CBF160   0xD0E5277E
+0190: 0xFFFFFFFE   0x0028FDBC   0x74CB5D40   0x74C99F10
+01A0: 0x00748A82   0x0028FE14   0x755E8F60   0x00000000
+01B0: 0x0028FF80   0x7FFDE000   0x01700000   0x4F0C8D96
+01C0: 0x01701350   0x00000008   0x00000100   0x00000008
+01D0: 0x00000102   0x44700000   0x44070000   0x00000000
+01E0: 0x00000000   0x00000780   0x00000438   0x00000000
+01F0: 0x00000001   0x003306E6   0x00000202   0x00000000
+0200: 0x01F9033B   0x48278A3B   0x0000033B   0x000001F9
+0210: 0x0000002C   0x0028FE24   0x00825EA4   0x0028FF70
+0220: 0x754F30A5   0x00000000   0x7FFDE000   0x00821D17
+0230: 0x00835342   0xA58FAE79   0x0028FF80   0x008246F1
+0240: 0x00400000   0x00000000   0x01953F25   0x0000000A
+0250: 0x00000094   0x00000006   0x00000002   0x000023F0
+0260: 0x00000002   0x00000000   0x00000000   0x00000000
+0270: 0x00000000   0x00000000   0x00000000   0x00000000

SCM Op: 0x77E, lDbg: 0 LastRendObj: 3095

Game Version: US 1.0

State Information: Ped Context: 0
P0 (0,0)
As I said, sometimes it crashes, and sometimes it dosen't. I also tried without any formating or defining and I had same result.
You get crash when run the TABLIST without color embeding too? Or only with color?
Reply
#10

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
You get crash when run the TABLIST without color embeding too? Or only with color?
Yeah, I just removed the color embeding and there's no crashes.
But that's still weird, I have another dialog, it never crashes.

This one works fine, and the one with SMG dosen't, unless I remove color embeding.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)