Dialog -
KinderClans - 05.09.2018
What's wrong with this dialog:
pawn Код:
CMD:testing(playerid)
{
ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_TABLIST_HEADERS, "Server Commands",
"Command\tFunction\n\
/cmds\tShows a list of server commands\n\",
/rules\tShow server rules\n\",
"Close", "");
return 1;
}
error 075: input line too long (after substitutions)
error 029: invalid expression, assumed zero
error 017: undefined symbol "tShows"
error 017: undefined symbol "a"
fatal error 107: too many error messages on one line
Re: Dialog -
ShihabSoft - 05.09.2018
CMD:testing(playerid)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS, "Server Commands",
"Command\tFunction\n/cmds\tShows a list of server commands\n,/rules\tShow server rules\n",
"Close", "");
return 1;
}
Pawno doesn't support escaping newlines like that
Re: Dialog -
KinderClans - 05.09.2018
Thank you it works. Now i have a problem with this:
pawn Код:
CMD:players(playerid, params[])
{
static List[1500];
new zone[MAX_ZONE_NAME];
List = "Player\tID\tZone";
for(new i,g = GetPlayerPoolSize(); i < g+1; i++)
if(IsPlayerConnected(i))
GetPlayer2DZone(i, zone, MAX_ZONE_NAME);
format(List, sizeof(List), "%s\n%s\t%i\t%s", List, ReturnName(i, 0), i, zone);
if(strlen(List) > 0) ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Online Players:", List, "Close", "");
return 1;
}
error 017: undefined symbol "i"
at the format line.
Re: Dialog -
NaS - 05.09.2018
Quote:
Originally Posted by KinderClans
Thank you it works. Now i have a problem with this:
pawn Код:
CMD:players(playerid, params[]) { static List[1500];
new zone[MAX_ZONE_NAME]; List = "Player\tID\tZone";
for(new i,g = GetPlayerPoolSize(); i < g+1; i++) if(IsPlayerConnected(i))
GetPlayer2DZone(i, zone, MAX_ZONE_NAME); format(List, sizeof(List), "%s\n%s\t%i\t%s", List, ReturnName(i, 0), i, zone);
if(strlen(List) > 0) ShowPlayerDialog(playerid, DIALOG_UNUSED, DIALOG_STYLE_TABLIST_HEADERS, "Online Players:", List, "Close", ""); return 1; }
error 017: undefined symbol "i"
at the format line.
|
Use brackets. Only GetPlayer2DZone is now a compound block with if() and for().
That's why scripting like that should be considered bad practice. You loose track of what belongs together.