sziasztok csináltam dialogós help menüt de ez mint mindig rossz.
Menü:
[pawn]#include <a_samp>
#define HELPME 20
#define HELP_HELPME
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(\"/help\", cmdtext, true))
{
ShowPlayerDialog(playerid, HELPME, DIALOG_STYLE_LIST, \"SEGÍTSÉG\", \"......\", \"Kiválaszt\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == HELPME)
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,HELP_HELPME,DIALOG_STYLE_MSGBOX,\"......\",\".........\",\"Ok\",\"Vissza\");
case 1: ShowPlayerDialog(playerid,HELP_HELPME,DIALOG_STYLE_MSGBOX,\"......\",\".........\",\"Ok\",\"Vissza\");
case 2: ShowPlayerDialog(playerid,HELP_HELPME,DIALOG_STYLE_MSGBOX,\"......\",\".........\",\"Ok\",\"Vissza\");
}
}
else
{
SendClientMessage(playerid, 0xF97804FF, \"Kiléptél a Segítség menübõl!\");
}
}
return ;
}[/pawn]
Hibák:
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : error 029: invalid expression, assumed zero
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : error 029: invalid expression, assumed zero
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : warning 215: expression has no effect
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : warning 215: expression has no effect
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : warning 215: expression has no effect
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : warning 215: expression has no effect
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : error 001: expected token: \";\", but found \")\"
C:\\Program Files\\LEGNAGYOBB\\SERVER\\filterscripts\\hep.pwn(27) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Tessék, javítottam neked.
#include <a_samp>
#define HELPME 20
#define HELP_HELPME
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/help\", true) == 0)
{
ShowPlayerDialog(playerid, HELPME, DIALOG_STYLE_LIST, \"SEGÍTSÉG\", \"......\", \"Kiválaszt\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == HELPME)
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,257,DIALOG_STYLE_MSGBOX,\"Help!\",\"Ide a szöveg\\n asdasd\",\"Kiválaszt\",\"Kiválaszt\");
case 1: ShowPlayerDialog(playerid,258,DIALOG_STYLE_MSGBOX,\"Help!\",\"Ide a szöveg\\n asdasd\",\"Kiválaszt\",\"Kiválaszt\");
case 2: ShowPlayerDialog(playerid,259,DIALOG_STYLE_MSGBOX,\"Help!\",\"Ide a szöveg\\n asdasd\",\"Kiválaszt\",\"Kiválaszt\");
}
}
else
{
SendClientMessage(playerid, 0xF97804FF, \"Kiléptél a Segítség menübõl!\");
}
}
return 1;
}
Tessék, javítottam neked.
#include <a_samp>
#define HELPME 20
#define HELP_HELPME
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, \"/help\", true) == 0)
{
ShowPlayerDialog(playerid, HELPME, DIALOG_STYLE_LIST, \"SEGÍTSÉG\", \"......\", \"Kiválaszt\", \"Mégse\");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == HELPME)
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,257,DIALOG_STYLE_MSGBOX,\"Help!\",\"Ide a szöveg\\n asdasd\",\"Kiválaszt\",\"Kiválaszt\");
case 1: ShowPlayerDialog(playerid,258,DIALOG_STYLE_MSGBOX,\"Help!\",\"Ide a szöveg\\n asdasd\",\"Kiválaszt\",\"Kiválaszt\");
case 2: ShowPlayerDialog(playerid,259,DIALOG_STYLE_MSGBOX,\"Help!\",\"Ide a szöveg\\n asdasd\",\"Kiválaszt\",\"Kiválaszt\");
}
}
else
{
SendClientMessage(playerid, 0xF97804FF, \"Kiléptél a Segítség menübõl!\");
}
}
return 1;
}
Ez tényleg full hiba mentes!
Ezt rakd be help menü-nek ninjo! :)