String doesn't show up -
Abreezy - 25.01.2012
pawn Код:
format(labelString, sizeof(labelString), "House %d (owned)\nOwner: %s", x, HouseInfo[x][hOwner]);
UpdateDynamic3DTextLabelText(HouseInfo[x][hText],COLOR_YELLOW,labelString);
Why doesn't it show the Player's name? It saves the name perfectly to file.
Re: String doesn't show up - T0pAz - 25.01.2012
Debug it by using prinft("House: %d", HouseInfo[x][hOwner]) and another thing. What is the x variable?
Re: String doesn't show up -
Abreezy - 25.01.2012
It's apart of a loop, x being houseid. no need to debug, cause on my files, it inserts the name perfectly
Re: String doesn't show up -
iggy1 - 25.01.2012
There is a need to debug because it's not working. Try using prints. If the variables hold the correct values and your destination array is large enough that code will work.
Re: String doesn't show up -
Abreezy - 25.01.2012
Alright, I'll try a print, will post results.
Re: String doesn't show up -
Abreezy - 25.01.2012
Yeah, it's not getting the playername
Re: String doesn't show up -
Abreezy - 25.01.2012
Alright now I fixed that, but the text still stays blank.
Is there any other methods of displaying text without dynamic3dtext?
Re: String doesn't show up -
MP2 - 25.01.2012
Fully debug it like so:
pawn Код:
format(labelString, sizeof(labelString), "House %d (owned)\nOwner: %s", x, HouseInfo[x][hOwner]);
printf("House: %i Owner: %s", HouseInfo[x][hOwner]);
printf("labelString = '%s'", labelString);
UpdateDynamic3DTextLabelText(HouseInfo[x][hText], COLOR_YELLOW, labelString);
printf("Updating house label %i", HouseInfo[x][hText]);
If the labelString is okay, your HouseInfo[x][hText] is wrong, and you are updating the wrong label.
EDIT: Try moving (literally walking with your player) after it's updated. I don't think it syncs until you move. If you already did, try again, disregard this or use debugging.