String Variables
#1

Hello, i get a vehicle name from MySQL database:
Код:
mysql_get_field("vName", vInfo[carid][vName]);
(carid is vehicle id)
And use it in:
Код:
 format(ma, sizeof(ma), "'%s' ID: %i\n---Antros maљinos nėra---",vInfo[mid1][vName], pInfo[playerid][m1id]);
And in game show me not real name "Infernus", but "i0Cs0".
Maybye someone know why?

P.S. Sorry for my bad english
Reply
#2

pawn Код:
mysql_fetch_field_row(vInfo[carid][vName],"vName");
Try this ...
Reply
#3

Quote:
Originally Posted by -=Dar[K]Lord=-
Посмотреть сообщение
pawn Код:
mysql_fetch_field_row(vInfo[carid][vName],"vName");
Try this ...
Nothing...
Reply
#4

well then it isnt saving the car name correctly... You have to get the car name when you store the car name in "vName" and then you have to set it to your variable
Reply
#5

Something like this:
Код:
 new result[128];
mysql_get_field("vName", result);
vInfo[carid][vName] = result;
?

Then i get this error:
Код:
error 006: must be assigned to an array
Reply
#6

Can you show where is the vInfo[carid][vName] ? Or add [128] after it..
Reply
#7

Yea, i Add [128] when i create vName, and now work. Thanks
Reply
#8

pawn Код:
mysql_fetch_field_row(result, "vName");
strmid(vInfo[carid][vName], result, 0, strlen(result));
Edit: If this doesn't work, show me the enumeration for vInfo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)