String doesn't show up
#1

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.
Reply
#2

Debug it by using prinft("House: %d", HouseInfo[x][hOwner]) and another thing. What is the x variable?
Reply
#3

It's apart of a loop, x being houseid. no need to debug, cause on my files, it inserts the name perfectly
Reply
#4

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.
Reply
#5

Alright, I'll try a print, will post results.
Reply
#6

Yeah, it's not getting the playername
Reply
#7

Alright now I fixed that, but the text still stays blank.

Is there any other methods of displaying text without dynamic3dtext?
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)