little problem
#1

Hello guys, I got a little problem, I got this code here where the date wouldn't show normally, it shows the server was last restarted at "time" on "date" but "date" doesn't show the year correctly, it only shows 201 and not 2014.

PHP код:
format(lastrestartsizeof(lastrestart), "*** {33AA33}The server was last restarted at %s on %s."gLastRestartedTimegLastRestartedDate); 
Reply
#2

Quote:
Originally Posted by Jhony_Blaze
Посмотреть сообщение
Hello guys, I got a little problem, I got this code here where the date wouldn't show normally, it shows the server was last restarted at "time" on "date" but "date" doesn't show the year correctly, it only shows 201 and not 2014.

PHP код:
format(lastrestartsizeof(lastrestart), "*** {33AA33}The server was last restarted at %s on %s."gLastRestartedTimegLastRestartedDate); 
String size probably to small ?
Quote:

lastrestart

Reply
#3

And how can I fix that ?
Reply
#4

pawn Код:
new lastrestart[128];
add this instead of yours xs
Reply
#5

Can you show me the code ?

Or you have
Quote:

lastrestart[avalue]

Change it to
Quote:

lastrestart[256]

Reply
#6

Quote:
Originally Posted by StreetRP
Посмотреть сообщение
Can you show me the code ?

Or you have

Change it to
One tip, DO NOT make this! It's an unneeded to big size.
Reply
#7

Quote:
Originally Posted by Flori
Посмотреть сообщение
One tip, DO NOT make this!
And Why ?!
Reply
#8

I had

Код:
new lastrestart[128];
I am gonna try with

Код:
lastrestart[256]
Reply
#9

Quote:
Originally Posted by StreetRP
Посмотреть сообщение
And Why ?!
Why making that string so big if you just need a size of 128? It's unneeded. Or count the letters one by one. You will never reach 256 LOL, then use 140, bc just one letter missed also 129 would be enough.
Reply
#10

But he had 128 and doesent work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)