CreateDynamic3DTextLabel issue.
#1

Hello,


I am creating a dynamic door system and it appears that while attempting to create a label for my door.. I find to have issues. I do know that the name of the door is being called ( I believe ) due to seeing this in my MySQL debug log.

Код:
[12:24:13] CMySQLHandler::FetchField("DName") - Test

[12:24:13] >> mysql_fetch_row_format( Connection handle: 1 )
while in game this is what I am seeing.




Looks like a whole lot of invalid characters maybe?


Here is a section of code that is involved.



pawn Код:
mysql_fetch_field_row(savingstring, "DName"); DoorData[id][dName] = strval(savingstring);
        new string[128];
        format(string, sizeof(string), "%s\nID: %d",DoorData[id][dName],id);
        CreateDynamic3DTextLabel(string, COLOR_YELLOW, DoorData[id][dExteriorX], DoorData[id][dExteriorY], DoorData[id][dExteriorZ]+1,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, DoorData[id][dExteriorVW], DoorData[id][dExteriorInt], -1);

Do ask if more information is needed!

Cheers!
Reply
#2

pawn Код:
mysql_fetch_field_row(savingstring, "DName"); DoorData[id][dName] = strval(savingstring);
Should probably be:
pawn Код:
mysql_fetch_field_row(savingstring,"DName"); format(DoorData[id][dName],sizeof(savingstring),savingstring);
strval can be used to convert a string to an integer.

Source: wiki.sa-mp.com
Reply
#3

Works great, Thanks lad.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)