06.06.2013, 11:24
Hi. I'm trying to load 3d text labels from my database, but it keeps coming with an argument type mismatch.
Usually when I have problems like this, it's something that everyone can see, but apparently my eye can't find it!
pawn Код:
TextLabelInfo[i][tlObject] = Create3DTextLabel(TextLabelInfo[i][tlText], TextLabelInfo[i][tlColor], TextLabelInfo[i][tlPosX], TextLabelInfo[i][tlPosY], TextLabelInfo[i][tlPosZ], 40.0, 0, 0);
pawn Код:
LoadTextLabels(playerid)
{
for(new i = 0; i != MAX_TEXTLABELS; i++)
{
if(TextLabelInfo[i][tlCreated] == 0)
{
new query[300];
new savingstring[20];
mysql_query("SELECT * FROM 3dtexts");
mysql_store_result();
while(mysql_fetch_row_format(query, "|"))
{
mysql_fetch_field_row(savingstring, "id"); TextLabelInfo[i][tlID] = strval(savingstring);
mysql_fetch_field_row(savingstring, "text"); TextLabelInfo[i][tlText] = strval(savingstring);
mysql_fetch_field_row(savingstring, "color"); TextLabelInfo[i][tlColor] = strval(savingstring);
mysql_fetch_field_row(savingstring, "posx"); TextLabelInfo[i][tlPosX] = strval(savingstring);
mysql_fetch_field_row(savingstring, "posy"); TextLabelInfo[i][tlPosY] = strval(savingstring);
mysql_fetch_field_row(savingstring, "posz"); TextLabelInfo[i][tlPosZ] = strval(savingstring);
}
TextLabelInfo[i][tlObject] = Create3DTextLabel(TextLabelInfo[tlText], TextLabelInfo[tlColor], TextLabelInfo[tlPosX], TextLabelInfo[tlPosY], TextLabelInfo[tlPosZ], 40.0, 0, 0);
}
}
}