AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   parse_time crash the server (https://forums.alliedmods.net/showthread.php?t=294677)

KiLLeR. 03-04-2017 18:42

parse_time crash the server
 
This crashing the server, WHY?!?
PHP Code:

new unix_timestamp parse_time("Mar""%b"); 

According to wiki, missing information will be filled with current time, so this should return the unix timestamp for current day, year, hour, minute, second and given month.

georgik57 03-06-2017 03:06

Re: parse_time crash the server
 
What are "Mar" and "%b" supposed to do? Read the documentation again.
PHP Code:

/* Returns time in input and additionaly fills missing information
* with current time and date. If time is different than -1 then parsed
* time is added to given time.
* Example:
* parset_time( "10:32:54 04/02/2003", "%H:%M:%S %m:%d:%Y" )
* For more information see strptime(...) function from C libraries. */
native parse_time(const input[],const format[], time = -1); 


KiLLeR. 03-06-2017 11:38

Re: parse_time crash the server
 
You need to read it!? ;x
%b - Abbreviated month name - Aug

KiLLeR. 03-08-2017 15:14

Re: parse_time crash the server
 
bump?!


All times are GMT -4. The time now is 20:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.