SA-MP Forums Archive
String issues - 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: String issues (/showthread.php?tid=274988)



String issues - ShawnMiller1337 - 07.08.2011

Hmm my problem is this

Example:

Код:
new string[5000];
I put this in my
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Now I have a list of interiors as a dialogmenu , It's a really long list so when my admins do the command to go to a interior a menu should be popping up as a list of interiors , There is a total of 50 interiors on this dialog list , Now when I have the new string[5000]; Dosn't show the dialogbox but when i lower the string to like lets say new string[2000] but it only displays around half of the interiors on the list. So when i change it back to new string[5000]; the list dosnt even come up but when the string is set to 2000 only half of what comes up ? How to make the entire thing come up ?


Re: String issues - Tee - 07.08.2011

Show use the command / dialog.


Re: String issues - ShawnMiller1337 - 07.08.2011

Код:
if(strcmp(cmd, "/phint", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
             if(PlayerInfo[playerid][pAdmin] >= 1337)
             {
                 ShowPlayerDialog(playerid,DPHINT,DIALOG_STYLE_LIST,"Property House - Interiors","Interior 1\nInt2\nInt3\nInt4\nInt5\nInt6\nInt7\nInt8\nInt8\nInt9\nInt10\nInt11\nInt12\nInt13\nInt14\nInt15\nInt16\Int17\Int18\nInt20\nInt21\nInt22","Select","Exit");
             }
             else
             {
				 SendClientMessage(playerid,COLOR_YELLOW,"You are not admin");
             }
        }
		return 1;
	}



Re: String issues - Tee - 08.08.2011

First: Don't alter the OnDialogResponse callback.
Second: I know you aren't getting any errors but try this:

pawn Код:
if(strcmp(cmd, "/phint", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] >= 1337)
        {
            new s[150]; // I'm gonna use strcat so it has to be more than 128 and it's a dialog -_-
            strcat(s,"Interior 1\nInt2\nInt3\nInt4\nInt5\nInt6\nInt7\nInt8\nInt8\nInt9\nInt10\nInt11\nInt12\nInt13\nInt14\nInt15\nInt16\Int17\Int18\nInt20\nInt21\nInt22");
            ShowPlayerDialog(playerid,DPHINT,DIALOG_STYLE_LIST,"Property House - Interiors",s,"Select","Exit");
        }
        else
        {
            SendClientMessage(playerid,COLOR_YELLOW,"You are not admin");
        }
    }
    return 1;



Re: String issues - ShawnMiller1337 - 08.08.2011

Thats not the problem tho , Why is it when I type the command and the string is over a certain amount it dosnt work ?

if i set the string to like 5000 it does not work but if I change the string number to around 2950 it shows the menu but only half is what is listed ? Understand what I am saying ? Is it to much string for sa-mp ? is there some plugin i could use or what


Re: String issues - EdeniaGaming - 08.08.2011

I too also have the same problem , I would like to know a solution


Re: String issues - Chrillzen - 08.08.2011

String 5000?!?!?! WTF BOOOM!

2000 shows half? 2+2 = 4, try 4000.


Re: String issues - zombieking - 08.08.2011

Make commands like /interiors1 , /interiors2 and so on


Re: String issues - EdeniaGaming - 08.08.2011

How big of a string would you use of 201 lines ?