Characters problem.
#1

Код HTML:
printf("Last Login to Safe: %s", Safes[hid][SafeLastLog]);
.Log:
Код HTML:
 [11:52:36] Last Login to Safe: 2##..*
I look strange characters, you would normally need to show me: 8/31/2015 11:48:29.
Reply
#2

Код:
printf("Last Login to Safe: %d", Safes[hid][SafeLastLog]);
Try like this?
Reply
#3

Make sure "Safes[hid][SafeLastLog]" variable is a string with specified length, also the timestamp field to hold the log time in your table needs to be varchar.
Reply
#4

Quote:
Originally Posted by SpikY_
Посмотреть сообщение
Код:
printf("Last Login to Safe: %d", Safes[hid][SafeLastLog]);
Try like this?
Код HTML:
Last Login to Safe: 50
Quote:
Originally Posted by Sjn
Посмотреть сообщение
Make sure "Safes[hid][SafeLastLog]" variable is a string with specified length, also the timestamp field to hold the log time in your table needs to be varchar.
I checked and everything is ok.
Reply
#5

Show the code where you fetch the string into your var.
Reply
#6

Код HTML:
orm_addvar_string(ormid, Safes[r][SafeLastLog], 64, "SafeLastLog");
Reply
#7

Anyone?
Reply
#8

have a look on this wiki example :

Код:
new hour, minute, second, string[32];
gettime(hour, minute, second);
 
format(string, sizeof(string), "The time is %02d:%02d:%02d.", hour, minute, second); // will output something like 09:45:02
SendClientMessage(playerid, -1, string);
Reply
#9

Not work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)