CTime problem? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CTime problem? (
/showthread.php?tid=436638)
CTime problem? -
gabyk - 12.05.2013
Hi i made this script
pawn Код:
new name [ MAX_PLAYER_NAME ],
k_time = cache_get_field_content_int ( 0, "time", dbCON );
cache_get_field_content ( 0, "name", name, dbCON );
if ( !strcmp ( name, GetName ( playerid ) ) ) {
printf ( "%d", difftime ( time ( ), k_time ) );
}
I had error type mismatch at
difftime ( time ( ), k_time ) why

?
I tryed to convert k_time value to a Time: variable.. nothing..
Re: CTime problem? -
Kwarde - 12.05.2013
Can you show me this
difftime() function?
Re: CTime problem? -
gabyk - 12.05.2013
native difftime(Time: tTime1, Time: tTime2);
-->
https://sampforum.blast.hk/showthread.php?tid=294054
Re: CTime problem? -
Kwarde - 12.05.2013
So
time() is actually
gettime() - Have you tried using gettime() instead of time() already? (It's probably the same, but you could give that a try)