What could be the problem? -
Arca - 18.08.2012
This is the code.
pawn Код:
stock ShowTeam(playerid)
{
new tempStr[128];
for(new i = 0; i < MAX_TEAMS; i ++)
{
strcat(tempStr, TI[i][name], 128);
strcat(tempStr, "\n", 128);
}
printf("%s", tempStr);
ListBox(playerid, dChooseTeam, "Choose a team.", tempStr);
}
However the ListBox is not shown because it's not being called. Same with the printf function. What could be the problem?
Edit: This is the ListBox function.
pawn Код:
stock ListBox(playerid, dialogid, text[], list[]) ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, text, list, "SELECT", "CLOSE");
This is the TI array.
pawn Код:
new TI[MAX_TEAMS][tInfo] =
{
{ "Blue", { 0.0, 0.0, 0.0, 90.0 }, { 24, 0, 0, 0 }, 28, COLOR_BLUE, 0 },
{ "Red", { 0.0, 0.0, 0.0, 90.0 }, { 26, 0, 0, 0 }, 29, COLOR_RED, 0 }
};
P.S. The function itself(ShowTeam) has been called correctly.
Re: What could be the problem? -
Arca - 18.08.2012
Still can't figure out the problem. :/
Re: What could be the problem? -
Akira297 - 19.08.2012
Quote:
Originally Posted by Arca
This is the code.
pawn Код:
stock ShowTeam(playerid) { new tempStr[128];
for(new i = 0; i < MAX_TEAMS; i ++) { strcat(tempStr, TI[i][name], 128); strcat(tempStr, "\n", 128); } printf("%s", tempStr); // This goes to your server.exe / server.bat and prints on it. ListBox(playerid, dChooseTeam, "Choose a team.", tempStr); // Correct define is, ShowPlayerDialog }
However the ListBox is not shown because it's not being called. Same with the printf function. What could be the problem?
Edit: This is the ListBox function.
pawn Код:
stock ListBox(playerid, dialogid, text[], list[]) ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, text, list, "SELECT", "CLOSE");
This is the TI array.
pawn Код:
new TI[MAX_TEAMS][tInfo] = { { "Blue", { 0.0, 0.0, 0.0, 90.0 }, { 24, 0, 0, 0 }, 28, COLOR_BLUE, 0 }, { "Red", { 0.0, 0.0, 0.0, 90.0 }, { 26, 0, 0, 0 }, 29, COLOR_RED, 0 } };
P.S. The function itself(ShowTeam) has been called correctly.
|
For your printf ~ I don't understand what you want there.
and add' , error logs and information, anything else that might be needed included for your errors.
Код:
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, text, list, "SELECT", "CLOSE");
Re: What could be the problem? -
Arca - 19.08.2012
Quote:
Originally Posted by Akira297
For your printf ~ I don't understand what you want there.
and add' , error logs and information, anything else that might be needed included for your errors.
Код:
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, text, list, "SELECT", "CLOSE");
|
There are no errors. I use printf to debug the code for seeing the actual problem. The problem was on the array.
P.S. I fixed it already.
Re: What could be the problem? -
Akira297 - 19.08.2012
Error was fixed,
/closed.