SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/03/2017, 11:25 PM   #1
Face9000
Banned
 
Join Date: Jan 2010
Location: Pigland
Posts: 3,351
Reputation: 190
Default Dialog too long

I have this dialog but seems too long and cant compile. I know i have to use strcat but idk how to do it with the DIALOG_STYLE_LIST

pawn Code:
CMD:obj(playerid)
{
    if (Player[playerid][Vip] < 1)
    {
        ShowPlayerDialog(playerid,DIALOG_VIP_OBJECTS,DIALOG_STYLE_LIST,"Hold Objects","SantaHat               \nParrot               \nParrot-Man               \nHippo               \nMotorCycleHelmet               \nCapBack                \nGlasses                \nSmokeFlare                \nSphere1                \nSphere2                \nSphere3                \nBalon               \nIron               \nAlien               \nIcread               \n{ffff12}Weaponaizer              \nRemove Hold Objects","Ok","Close");
    }
    return 1;
}
Face9000 is offline   Reply With Quote
Old 26/03/2017, 11:29 PM   #2
Toroi
Gangsta
 
Toroi's Avatar
 
Join Date: Feb 2017
Location: Venezuela
Posts: 698
Reputation: 146
Default Re: Dialog too long

Why are you using these many spaces?
Toroi is offline   Reply With Quote
Old 27/03/2017, 12:39 AM   #3
Face9000
Banned
 
Join Date: Jan 2010
Location: Pigland
Posts: 3,351
Reputation: 190
Default Re: Dialog too long

Do you think removing space Pawno will compile it?
Face9000 is offline   Reply With Quote
Old 27/03/2017, 12:52 AM   #4
Toroi
Gangsta
 
Toroi's Avatar
 
Join Date: Feb 2017
Location: Venezuela
Posts: 698
Reputation: 146
Default Re: Dialog too long

Yes. Why are the spaces there anyway, I see no point.
Toroi is offline   Reply With Quote
Old 27/03/2017, 11:06 AM   #5
verlaj
Huge Clucker
 
Join Date: Sep 2012
Posts: 273
Reputation: 16
Default Re: Dialog too long

Use strcat for very long dialogs. E.g

New dialogstr(12;
Strcat(dialogstr,"Van\n");
Strcat(dialogstr,"van2\n");

Then use dialogstr in the ShowDialog instead.

Edit: tho i have heard memcpy is faster than strcat.
__________________
Developer at paruni.net
Heller

verlaj is offline   Reply With Quote
Old 27/03/2017, 11:42 AM   #6
Yuri8
Big Clucker
 
Join Date: Nov 2016
Posts: 71
Reputation: 2
Exclamation Re: Dialog too long

Hey, to do this you need to remove spaces like this:
PHP Code:
CMD:obj(playerid)
{
    if (
Player[playerid][Vip] < 1)
    {
        
ShowPlayerDialog(playerid,DIALOG_VIP_OBJECTS,DIALOG_STYLE_LIST,"Hold Objects","Santa Hat\nParrot\nParrot-Man\nHippo\nMotorCycleHelmet\nCapBack\nGlasse\nSmokeFlare\nSphere1\nSphere2\nSphere3\nBalon\nIron\nAlien\nIcread\n{ffff12}Weaponaizer\nRemove Hold Objects","Ok","Close");
    }
    return 
1;

I hope I helped.
Yuri8 is offline   Reply With Quote
Old 27/03/2017, 01:01 PM   #7
LazzyBoy
Big Clucker
 
Join Date: Mar 2017
Posts: 187
Reputation: 13
Default Re: Dialog too long

You also can create a string and show the string into dialog

Code:
new string[128];
format(string,sizeof(string),"Whatever you need here");
ShowPlayerDialog(playerid,dialogid,dialogstyle,"Hold Objects",string,"Click","Cancel");
__________________
LazzyBoy is offline   Reply With Quote
Old 27/03/2017, 01:03 PM   #8
Hackzzzz
Little Clucker
 
Join Date: Dec 2013
Posts: 32
Reputation: 1
Default Re: Dialog too long

Try this:
http://pawntools.ml/?hash=lD7Buz
Hackzzzz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Long dialog jackci Scripting Help 8 27/05/2013 03:17 AM
[HELP] Long Dialog Lykiaη ☼ Scripting Help 2 30/01/2013 02:11 PM
Long dialog. The__ Scripting Help 10 03/08/2012 02:20 PM
[Help!] Long Dialog Box Rep++ afa_handler Scripting Help 4 02/05/2012 04:07 PM
[HELP] Dialog to long? WThieves Help Archive 6 27/05/2010 09:28 PM


All times are GMT. The time now is 03:01 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.