SA-MP Forums Archive
ShowPlayerDialog Error - 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)
+--- Thread: ShowPlayerDialog Error (/showthread.php?tid=496148)



ShowPlayerDialog Error - Phil_Cutcliffe - 20.02.2014

I've just spend hours going through my code adding all the names to each peace of furniture and now this is whining at me.. I take it the line is too long? That's the only thing I can think of.. If it is how do I carry the code onto the next line?

Here are the errors..

pawn Код:
C:\Users\User\Documents\SAMP Stuff\SA-MP Server\GTA-SH Server\gamemodes\GTASH_FurniAdd.pwn(4928) : error 075: input line too long (after substitutions)
C:\Users\User\Documents\SAMP Stuff\SA-MP Server\GTA-SH Server\gamemodes\GTASH_FurniAdd.pwn(4929) : error 027: invalid character constant
C:\Users\User\Documents\SAMP Stuff\SA-MP Server\GTA-SH Server\gamemodes\GTASH_FurniAdd.pwn(4929) : error 017: undefined symbol "mrk_seating1"
C:\Users\User\Documents\SAMP Stuff\SA-MP Server\GTA-SH Server\gamemodes\GTASH_FurniAdd.pwn(4929) : error 029: invalid expression, assumed zero
C:\Users\User\Documents\SAMP Stuff\SA-MP Server\GTA-SH Server\gamemodes\GTASH_FurniAdd.pwn(4929) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
if(listitem == 0)
        {
            ShowPlayerDialog(playerid, 510, DIALOG_STYLE_LIST, "Furniture Chairs", "mrk_seating1\nkb_couch05\nchairsntable\nswivelchair_B\nkb_chair03\nkb_chair04\nkb_chair02\nkb_chair01\nkb_swivelchair1\nhotel_single_3\nrest_chair\ncj_easychair1\nswank_din_chair_5\nkb_table_chairs1\nswank_din_chair_2\nmed_din_chair_1\ncj_pizza_chair3\nmrk_seating2\nmrk_seating2b\nswank_1_footstool\nswk_single_1b\nswk_single_1\nlow_single_3\nmed_single_1\nlow_single_2\nswank_single_2\nlow_single_1\nlow_single_4\nmed_single_2\nlounger\nkb_couch06\nkb_couch03\nkb_couch05\nkb_couch03\nkb_couch04\nswank_couch_1\nlow_couch_4\nlow_couch_5\nmed_couch_2\nswank_couch_2\nlow_couch_1\nlow_couch_2\nlow_couch_3\nhotel_single_1\nhotel_single_2", "Ok", "Cancel");
        }



Re: ShowPlayerDialog Error - phoon - 20.02.2014

The list you made is very long. Use Strcat.


Re: ShowPlayerDialog Error - Konstantinos - 20.02.2014

Search next time, it's been answered thousand of times.

pawn Код:
new sz_Info[638] = "mrk_seating1\nkb_couch05\nchairsntable\nswivelchair_B\nkb_chair03\nkb_chair04\nkb_chair02\nkb_chair01\nkb_swivelchair1\nhotel_single_3\nrest_chair";
strcat(sz_Info, "\ncj_easychair1\nswank_din_chair_5\nkb_table_chairs1\nswank_din_chair_2\nmed_din_chair_1\ncj_pizza_chair3\nmrk_seating2\nmrk_seating2b\nswank_1_footstool\nswk_single_1b\nswk_single_1\nlow_single_3\nmed_single_1\nlow_single_2\nswank_single_2");
strcat(sz_Info, "\nlow_single_1\nlow_single_4\nmed_single_2\nlounger\nkb_couch06\nkb_couch03\nkb_couch05\nkb_couch03\nkb_couch04\nswank_couch_1\nlow_couch_4\nlow_couch_5\nmed_couch_2\nswank_couch_2\nlow_couch_1\nlow_couch_2\nlow_couch_3\nhotel_single_1\nhotel_single_2");
ShowPlayerDialog(playerid, 510, DIALOG_STYLE_LIST, "Furniture Chairs", sz_Info, "Ok", "Cancel");



Re: ShowPlayerDialog Error - Phil_Cutcliffe - 20.02.2014

Quote:
Originally Posted by phoon
Посмотреть сообщение
The list you made is very long. Use Strcat.
Ok I've just sorted my list with strcat good idea I forgot about that!

pawn Код:
if(listitem == 0)
        {
            new dialog510[700];
            strcat(dialog510,"mrk_seating1\nkb_couch05\nchairsntable\nswivelchair_B\nkb_chair03\nkb_chair04\nkb_chair02\nkb_chair01\nkb_swivelchair1\nhotel_single_3\nrest_chair\ncj_easychair1\nswank_din_chair_5\nkb_table_chairs1\nswank_din_chair_2\nmed_din_chair_1\ncj_pizza_chair3\nmrk_seating2\nmrk_seating2b");
            strcat(dialog510,"\nswank_1_footstool\nswk_single_1b\nswk_single_1\nlow_single_3\nmed_single_1\nlow_single_2\nswank_single_2\nlow_single_1\nlow_single_4\nmed_single_2\nlounger\nkb_couch06\nkb_couch03\nkb_couch05\nkb_couch03\nkb_couch04\nswank_couch_1\nlow_couch_4\nlow_couch_5\nmed_couch_2\nswank_couch_2");
            strcat(dialog510,"\nlow_couch_1\nlow_couch_2\nlow_couch_3\nhotel_single_1\nhotel_single_2");
            ShowPlayerDialog(playerid, 510, DIALOG_STYLE_LIST, "Furniture Chairs", dialog510, "Ok", "Cancel");
        }
One more quick question.. I have a strange error.. Why is this complaining it is not defined? Surely it doesn't need to be?

pawn Код:
C:\Users\User\Documents\SAMP Stuff\SA-MP Server\GTA-SH Server\gamemodes\GTASH_FurniAdd.pwn(4995) : error 017: undefined symbol "mrk_seating1"
pawn Код:
ObjectInfo[i][oName] = mrk_seating1;



Re: ShowPlayerDialog Error - Necip - 20.02.2014

pawn Код:
new mrk_seating1;



Re: ShowPlayerDialog Error - Phil_Cutcliffe - 20.02.2014

Quote:
Originally Posted by Necip
Посмотреть сообщение
pawn Код:
new mrk_seating1;
Yeah I know that lol.. Really lame that I have to define every single one.. I have hundreds ^^

Find & Replace ftw


Re: ShowPlayerDialog Error - Clad - 20.02.2014

The line is too long it must not be over than 500 chara