Hi there,
I'm having an issue with ZDialog not displaying all the entries in a dynamic dialog, and since there seems to be no documentation available, I thought that one of you wise developers/scripters might help the humble scripter I am...
Strangely enough, the entries are correctly displayed most of the time, yet sometimes the page is missing some of the last entries. Here is the code setting the entries on the page: (The dialog is used to display my PW's guild system infos to players via a guild journal)
DeleteList(PAGE3, oPC);
string sSQL = "SELECT terry, guild, name FROM terries";
SQLExecDirect(sSQL);
while(SQLFetch())
{
int nTerry = StringToInt(SQLGetData(1));
int nGuild = StringToInt(SQLGetData(2));
string sTerry = SetGuildTextColor(nGuild, SQLGetData(3));
AddStringElement(sTerry, PAGE3, oPC);
ReplaceIntElement(nTerry-1, nTerry, PAGE3, oPC);
}
AddStringElement(ColorString("Previous options", 255, 165, 0), PAGE3, oPC);
ReplaceIntElement(GetElementCount(PAGE3, oPC)-1, -1, PAGE3, oPC);
SetDlgPageString(PAGE3);
Of course, this is just a snippet, and the database system(MySQL) is working flawlessly. The code above is called from the HandleSelection() function, although I've also tried to call it from the PageInit() function, with similar results. The retrieved entries to display are VARCHAR64, there are 10 to display(currently), and the memory reserved for readings is 16 * 128 instead of 8 * 128, tested, working fine. Also, I have several ZDialog files working well in the module, yet this one is the only one setting entries using loops, and it seems that the pages populated with loops do not always display all the entries, even if the loop performs very few iterations(Maybe I'm totally wrong here). Finally, I have tested the bug in MP environment, and even if I'm alone on the server, the bug is still there...
So that's the picture. I've thought about trying ZZDialog instead, but my PW already implements the amazing HGLL system, wich uses ZDialog, so I would rather stick to it too...
Any help would be greatly appreciated, thank you for reading this
Modifié par Kato_Yang, 18 mai 2011 - 07:49 .