Dialog problem
#1

Hello,

I have a problem when I run into the pickup comes nothing. And when I do a command it then stands SERVER: Unkown Command.

code:
Код:
ocmd:test(playerid,params[])
{
	    new string2[200];
		for(new i=0;i!=MAX_AUTOHAUS;i++)
		{
			if(IsPlayerInRangeOfPoint(playerid,3,AutoHaus[i][aX],AutoHaus[i][aY],AutoHaus[i][aZ]))
			{
			    for(new n=1;n<sizeof(AutoHausAuto);n++)
				{
					format(string2,sizeof string2,"\n%s",CarName[AutoHausAuto[n][aAutoID] - 400]);
				}
				ShowPlayerDialog(playerid,DIALOG_AUTOHAUS,DIALOG_STYLE_LIST,"Autohaus",string2,"Weiter","");
			}
			continue;
		}
		return 1;
}
Reply
#2

Your indentation is fuckin bad.

A DIALOG_STYLE_LIST string must finish with a "\n".

So your format will become

PHP код:

format
(string2sizeof(string2), "\n%s\n"CarName[AutoHausAuto[n][aAutoID] - 400]); 
Also why does the "continue;" symbol does here ?

And for the error of the "server : unknown command", returning 0 to a dialog ID or a command name will show the message.
Reply
#3

Possible run time error 4. For example, if the ID of the vehicle is 0, it will access element at negative index -400.

Just to be sure though, use crashdetect plugin: https://github.com/Zeex/samp-plugin-...es/tag/v4.13.1
Use debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info

Re-compile your scripts and start the server. Execute the command and if it displays the unknown command message again, then post your server log.
Reply
#4

Sorry I use the ****** translator.

It has brought nothing. It opens no dialogue. And the crashdetectet with the there was no file.

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           6536 bytes
Code size:           230724 bytes
Data size:          1521964 bytes
Stack/heap size:      16384 bytes; estimated max. usage=2275 cells (9100 bytes)
Total requirements: 1775608 bytes
Reply
#5

It doesn't print anything to the server log (with [debug] prefix) even if it displays the unknown command in-game?
Reply
#6

No, there is simply nothing.... Please help me..
Reply
#7

Are you sure you loaded the crashdetect plugin or that it was loaded without problems? Because without its information is difficult to find the problem unless you manually debug it (print messages in each line of the command and see which one was the last line was executed).
Reply
#8

You don't need the continue; there.

Try this man! (untested)

pawn Код:
ocmd:test(playerid,params[])
{
        new string2[200];
        for(new i=0;i!=MAX_AUTOHAUS;i++)
        {
            if(IsPlayerInRangeOfPoint(playerid,3,AutoHaus[i][aX],AutoHaus[i][aY],AutoHaus[i][aZ]))
            {
                for(new n=1;n<sizeof(AutoHausAuto);n++)
                {
                    if(i == 1)
                    {
                        format(string2,sizeof string2,"%s",CarName[AutoHausAuto[n][aAutoID] - 400]);
                    }
                    else
                    {
                        format(string2,sizeof string2,"%s\n%s",string2,CarName[AutoHausAuto[n][aAutoID] - 400]);
                    }
                }
                ShowPlayerDialog(playerid,DIALOG_AUTOHAUS,DIALOG_STYLE_LIST,"Autohaus",string2,"Weiter","");
            }
        }
        return 1;
}
Reply
#9



I can not use Crashdetected. And the above-mentioned file is not available for Windows XP?


@Dokins This does not work well
Reply
#10

You need the c++ visual library package (latest version is prefered).

If I translate correctly, it would mean a missing dll message (here, msvcp120.dll).
Either, please translate in English. I took Spanish in 2nd language, not German.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)