SA-MP Forums Archive
Dialogue Help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialogue Help (/showthread.php?tid=170966)



Dialogue Help - BP13 - 24.08.2010

I have this:

pawn Код:
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "List of teleports", "Stunt Teleports:  /home /ss /df /dj /2c /bowl /fd1 /fd2 /hj /hp /lstower /lvairport /pj /skatepark /stadium /tp /tp1 /wallride /waytodeath /deadjump /monstercrash\n\nDeathmatches: /CNR /omaha /pirate /CSS /Gangwars /Jetpackdm /csdm /Sniperdm /lcdm /area51 /indoordm /MGM /OH /glassmadness /RCWAR /Shipmadness\n\nRacing and Drifting: /drag2 /drag /karting /karting2 /8track /canalrace /circuit /driftcity /hwydrag /beachcity /skrace /usr /dirt /drift", "OK", "Cancel");
and I'm getting the error:
Код:
error 075: input line too long (after substitutions)
I tired making it 2 lines but it breaks the code so what am I suppose to do?


Re: Dialogue Help - Claude - 24.08.2010

Instead of \n or
pawn Код:
ShowPlayerDialog(..., "
[text]"
);
use \n\


Re: Dialogue Help - BP13 - 24.08.2010

Did not change anything


Re: Dialogue Help - Sergei - 24.08.2010

You can only "beat" that you put text in more strings and then put them together.


Re: Dialogue Help - BP13 - 24.08.2010

Quote:
Originally Posted by Sergei
Посмотреть сообщение
You can only "beat" that you put text in more strings and then put them together.
What does that even mean? Also ive seen on other server have much more text than this.


Re: Dialogue Help - [XST]O_x - 24.08.2010

Something like:
pawn Код:
new string[64],string2[100],string3[165];
format(string,sizeof(string),"List of teleports", "Stunt Teleports:  /home /ss /df /dj /2c /bowl /fd1 /fd2 /hj /hp /lstower /lvairport /pj /skatepark /stadium /tp /tp1 /wallride /waytodeath /deadjump /monstercrash\n");
format(string2,sizeof(string2),"\nDeathmatches: /CNR /omaha /pirate /CSS /Gangwars /Jetpackdm /csdm /Sniperdm /lcdm /area51 /indoordm /MGM /OH /glassmadness /RCWAR /Shipmadness\n\nRacing and Drifting: /drag2 /drag /karting /karting2 /8track /canalrace /circuit /driftcity /hwydrag /beachcity /skrace /usr /dirt /drift");
format(string3,sizeof(string3),"%s %s",string,string2);
ShowPlayerDialog(playerid,2,style,string3....);
Not sure,but am I assuming right?


Re: Dialogue Help - Toni - 24.08.2010

Format the textdraw with a string;
pawn Код:
new str[1012]; //Just all in one
new msg[] = "enter as much text as you want, this will appear in the textdraw";
format(str, sizeof(str), "%s", msg));
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, str, "accept", "cancel");



Re: Dialogue Help - BP13 - 24.08.2010

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Something like:
pawn Код:
new string[64],string2[100],string3[165];
format(string,sizeof(string),"List of teleports", "Stunt Teleports:  /home /ss /df /dj /2c /bowl /fd1 /fd2 /hj /hp /lstower /lvairport /pj /skatepark /stadium /tp /tp1 /wallride /waytodeath /deadjump /monstercrash\n");
format(string2,sizeof(string2),"\nDeathmatches: /CNR /omaha /pirate /CSS /Gangwars /Jetpackdm /csdm /Sniperdm /lcdm /area51 /indoordm /MGM /OH /glassmadness /RCWAR /Shipmadness\n\nRacing and Drifting: /drag2 /drag /karting /karting2 /8track /canalrace /circuit /driftcity /hwydrag /beachcity /skrace /usr /dirt /drift");
format(string3,sizeof(string3),"%s %s",string,string2);
ShowPlayerDialog(playerid,2,style,string3....);
Not sure,but am I assuming right?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/test", true))
    {
        new string[64],string2[100], masterstring[165], string3[128];
        format(string,sizeof(string),"List of teleports", "Stunt Teleports:  /home /ss /df /dj /2c /bowl /fd1 /fd2 /hj /hp /lstower /lvairport /pj /skatepark /stadium /tp /tp1 /wallride /waytodeath /deadjump /monstercrash\n");
        format(string2,sizeof(string2),"\nDeathmatches: /CNR /omaha /pirate /CSS /Gangwars /Jetpackdm /csdm /Sniperdm /lcdm /area51 /indoordm /MGM /OH /glassmadness /RCWAR /Shipmadness\n");
        format(string3,sizeof(string3),"\nRacing and Drifting: /drag2 /drag /karting /karting2 /8track /canalrace /circuit /driftcity /hwydrag /beachcity /skrace /usr /dirt /drift\n");
        format(masterstring,sizeof(string3),"%s %s %s",string,string2,string3);
        ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"%s",masterstring);
        return 1;
    }
    return 0;
}
Код:
C:\Users\Braeden\Desktop\test.pwn(39) : warning 202: number of arguments does not match definition
C:\Users\Braeden\Desktop\test.pwn(39) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.



Re: Dialogue Help - Toni - 24.08.2010

Quote:
Originally Posted by The Toni
Посмотреть сообщение
Format the textdraw with a string;
pawn Код:
new str[1012]; //Just all in one
new msg[] = "enter as much text as you want, this will appear in the textdraw";
format(str, sizeof(str), "%s", msg));
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, str, "accept", "cancel");
Sigh
The message you have entered is too short. Please lengthen your message to at least 8 characters.


Re: Dialogue Help - BP13 - 29.08.2010

Quote:
Originally Posted by The Toni
Посмотреть сообщение
Sigh
The message you have entered is too short. Please lengthen your message to at least 8 characters.
Just for the record:

Код:
C:\Users\Braeden\Documents\SAMP Server - 0.3b\filterscripts\teleports.pwn(8) : error 075: input line too long (after substitutions)
C:\Users\Braeden\Documents\SAMP Server - 0.3b\filterscripts\teleports.pwn(9) : error 037: invalid string (possibly non-terminated string)
Same error.