gump error with latest pol100 core

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

gump error with latest pol100 core

Post by yayafan » Sat Dec 14, 2019 7:02 pm

Hello ,
I updated to the latest version of POL100, to use uicode function, it works!
But for some gump, I got error, for example:
when I use acctinfo command, and I click "Default CmdLevel:" button to change default cmdlevel for me, then no gump pup up and an error message in game :" Error - Unable to display gump. Error text is -> B1 message specified too many ints and/or strings."

It worked with older POL100 version (in 2018), so I guess maybe caused by unicode support core.....

Can someone help me to have a look?

in acctinfo.src:

======================
var input := RequestGump( mobile, "What do you want to sent this account's default cmdlevel to?","", account.defaultcmdlevel, CANCEL_BTN_ON );

======================
in requestgump function:

function RequestGump(mobile, question, option := "", pre_val := "", cancel_btn:=CANCEL_BTN_OFF)

if ( !pre_val || pre_val == error )
pre_val := "";
endif

var r_gump := GFCreateGump(140, 100);
GFClosable(r_gump, 0);

GFResizePic(r_gump, 0, 0, GFGetCfgConst("Defaults", "BackGround"), 400, 205);
GFResizePic(r_gump, 15, 15, GFGetCfgConst("Defaults", "ForeGround"), 370, 175);

GFAddAlphaRegion( r_gump, 0, 0, 400, 205 );

var y_pos := 20;
foreach line in (GFWordWrap(question, 370))
GFTextLine(r_gump, 20, y_pos, 1153, line);
y_pos += 20;
SleepMS(2);
endforeach

y_pos := 75;
foreach line in (GFWordWrap(option, 370))
GFTextLine(r_gump, 20, y_pos, 1153, line);
y_pos += 20;
SleepMS(2);
endforeach

GFResizePic(r_gump, 20, 100, GFGetCfgConst("BackGrounds", "GOLDTRIM"), 360, 30);
var r_txt := GFTextEntry(r_gump, 30, 105, 335, 25, 1153, pre_val);

if ( cancel_btn )
GFAddButton(r_gump, 90, 160, 2128, 2129, GF_CLOSE_BTN, 100);
GFAddButton(r_gump, 240, 160, 2119, 2120, GF_CLOSE_BTN, 200);
else
GFAddButton(r_gump, 180, 160, 2128, 2129, GF_CLOSE_BTN, 100);
endif

var input := GFSendGump(mobile, r_gump);
var text_area := GFExtractData(input, r_txt);

if ( input[200] )
return error;
elseif ( !text_area || text_area == error )
return 0;
else
return text_area;
endif
endfunction

Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: gump error with latest pol100 core

Post by Turley » Sat Dec 14, 2019 11:19 pm

Can you post a packetlog of the 0xB1 message?
E.g. start packetlogging via .startlog reproduce the bug and stop packetlogging via .stoplog.
In the log folder a new log file with your account name should appear.

yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

Re: gump error with latest pol100 core

Post by yayafan » Sun Dec 15, 2019 1:22 am

[12/15 16:59:50] Logfile opened.
Server -> Client: 0x1C, 65 bytes
0000 1c 00 41 01 01 01 01 01 01 00 03 b2 00 03 53 79 ..A..... ......Sy
0010 73 74 65 6d 00 00 00 00 00 00 00 00 00 00 00 00 stem.... ........
0020 00 00 00 00 00 00 00 00 00 00 00 00 49 2f 4f 20 ........ ....I/O
0030 6c 6f 67 20 66 69 6c 65 20 6f 70 65 6e 65 64 2e log file opened.
0040 00 ........ ........

Client -> Server: 0xBF, 6 bytes
0000 bf 00 06 00 24 34 ....$4.. ........

Client -> Server: 0xB1, 99 bytes
0000 b1 00 63 00 06 c7 56 01 05 8e e2 00 0a 00 06 00 ..c...V. ........
0010 00 00 00 00 00 00 13 00 02 00 00 00 03 00 00 00 ........ ........
0020 04 00 00 00 05 00 00 00 06 00 00 00 07 00 00 00 ........ ........
0030 08 00 00 00 09 00 00 00 0a 00 00 00 0b 00 00 00 .... ... ........
0040 0c 00 00 00 0d 00 00 00 0e 00 00 00 0f 00 00 00 ........ ........
0050 10 00 00 00 11 00 00 00 12 00 00 00 13 00 00 00 ........ ........
0060 14 00 00 ........ ........

Server -> Client: 0x1C, 76 bytes
0000 1c 00 4c 01 01 01 01 01 01 00 03 e8 00 03 53 79 ..L..... ......Sy
0010 73 74 65 6d 00 00 00 00 00 00 00 00 00 00 00 00 stem.... ........
0020 00 00 00 00 00 00 00 00 00 00 00 00 45 72 72 6f ........ ....Erro
0030 72 20 2d 20 55 6e 61 62 6c 65 20 74 6f 20 64 69 r - Unab le to di
0040 73 70 6c 61 79 20 67 75 6d 70 2e 00 splay gu mp......

Server -> Client: 0x1C, 111 bytes
0000 1c 00 6f 01 01 01 01 01 01 00 03 e8 00 03 53 79 ..o..... ......Sy
0010 73 74 65 6d 00 00 00 00 00 00 00 00 00 00 00 00 stem.... ........
0020 00 00 00 00 00 00 00 00 00 00 00 00 45 72 72 6f ........ ....Erro
0030 72 20 74 65 78 74 20 69 73 20 2d 3e 42 31 20 6d r text i s ->B1 m
0040 65 73 73 61 67 65 20 73 70 65 63 69 66 69 65 64 essage s pecified
0050 20 74 6f 6f 20 6d 61 6e 79 20 69 6e 74 73 20 61 too man y ints a
0060 6e 64 2f 6f 72 20 73 74 72 69 6e 67 73 2e 00 nd/or st rings...

Client -> Server: 0xBF, 6 bytes
0000 bf 00 06 00 24 70 ....$p.. ........

Client -> Server: 0xAD, 30 bytes
0000 ad 00 1e 00 02 b2 00 03 43 48 54 00 00 2e 00 73 ........ CHT....s
0010 00 74 00 6f 00 70 00 6c 00 6f 00 67 00 00 .t.o.p.l .o.g....

Log closed at %sSun Dec 15 16:59:54 2019

Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: gump error with latest pol100 core

Post by Turley » Sun Dec 15, 2019 5:36 am

Thx, I think I found the bug and yes I introduced it with the unicode support. please test latest revision. I just committed a fix.

yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

Re: gump error with latest pol100 core

Post by yayafan » Sun Dec 15, 2019 6:34 am

Can you complie your latest veriosn and give me the link to download?

I can't complie Core.....

Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: gump error with latest pol100 core

Post by Turley » Sun Dec 15, 2019 9:54 am


yayafan
Novice Poster
Posts: 40
Joined: Sun Mar 15, 2015 2:26 am

Re: gump error with latest pol100 core

Post by yayafan » Sun Dec 15, 2019 7:21 pm

You are great!
The problem is solved with this core!
:cheesy:

Post Reply