SA-MP Forums Archive
Line is to long how to change this? - 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: Line is to long how to change this? (/showthread.php?tid=562943)



Line is to long how to change this? - IndependentGaming - 12.02.2015

hello this line is to long how can i change it without any errors ?

Код:
ShowPlayerDialog(playerid,123498,DIALOG_STYLE_MSGBOX,"License help","{F2AD0D}Driving License{FFFFFF}, you can get this license by contacting the licensing school ICly\n{5591AA}Pilot License{FFFFFF}, In order to get your flying license you need to contact the licensing school ICly to.\n{AE51A5}Boat License{FFFFFF},To get the boat license you must contact the licensing school Icly.\n{00FF40}Fishing License{FFFFFF} To get the fishing license you need to find around los santos for a post office to get one.\n{2FD0D0}Weapon License{FFFFFF} For a weapon license you must apply on the forums and after you getting accepted you must wait for someone from the LSPD.","Close", "");



Re: Line is to long how to change this? - AndySedeyn - 12.02.2015

Make use of strcat: https://sampwiki.blast.hk/wiki/Strcat


Re: Line is to long how to change this? - IndependentGaming - 12.02.2015

How to you mean that ?


Re: Line is to long how to change this? - AndySedeyn - 12.02.2015

pawn Код:
new sstring[600];
strcat(sstring, "{F2AD0D}Driving License{FFFFFF}, you can get this license by contacting the licensing school ICly\n");
strcat(sstring, "{5591AA}Pilot License{FFFFFF}, In order to get your flying license you need to contact the licensing school ICly to.\n");
strcat(sstring, "{AE51A5}Boat License{FFFFFF},To get the boat license you must contact the licensing school Icly.\n");
strcat(sstring, "{00FF40}Fishing License{FFFFFF} To get the fishing license you need to find around los santos for a post office to get one.\n");
strcat(sstring, "{2FD0D0}Weapon License{FFFFFF} For a weapon license you must apply on the forums and after you getting accepted you must wait for someone from the LSPD.");
ShowPlayerDialog(playerid,123498,DIALOG_STYLE_MSGBOX,"License help", sstring,"Close", "");
Here's how strcat is used using your string as an example.
What strcat does is merge 2 or more strings together to one string. As you can see in the example: Driving license, Pilot license, boat license, fishing license and weapon license are merged together in one string: 'sstring'. This is used to avoid longer strings on one line.


Re: Line is to long how to change this? - Dignity - 12.02.2015

Use Zeex's PAWN compiler patches: https://sampforum.blast.hk/showthread.php?pid=2768123#pid2768123


Replace every file in your pawno directory provided by the download link there and it will be fixed.


Re: Line is to long how to change this? - IndependentGaming - 12.02.2015

i did it like you said but its not showing the dialog ingame same problem i had with house


Re: Line is to long how to change this? - AndySedeyn - 12.02.2015

Quote:
Originally Posted by hwakinsRP
Посмотреть сообщение
i did it like you said but its not showing the dialog ingame same problem i had with house
There must be something really wrong elsewhere in your gamemode/filterscript(s) which interferes with your dialogs.


Re: Line is to long how to change this? - IndependentGaming - 12.02.2015

Im not using any filterscripts


Re: Line is to long how to change this? - AndySedeyn - 12.02.2015

Quote:
Originally Posted by hwakinsRP
Посмотреть сообщение
Im not using any filterscripts
Quote:
Originally Posted by Bible
Посмотреть сообщение
There must be something really wrong elsewhere in your gamemode/filterscript(s) which interferes with your dialogs.
In your gamemode then.


Re: Line is to long how to change this? - IndependentGaming - 12.02.2015

what can be wrong in the gamemode ? there are other dialogs and when i copy it and replace it for example its not showing me the dialog the command is working and does not say unknown command.