PDA

View Full Version : SetSvarString info


Face9000
02/10/2015, 08:30 PM
Hello, i have this code:

new TimeString[64];
format(TimeString,sizeof(TimeString),"%02d:%02d",GameMinutes,GameSeconds);

To show game time left until next game, i wanna save it in SetSVarString for using later for my own, i tried with:


SetSVarString("TimeLeft", "%02d:%02d",GameMinutes,GameSeconds);

But got "argument doesn't match definitions".

Is possible to pass a string with SetSvarString? How?

Kaliber
02/10/2015, 08:50 PM
You have to format it..like:

new tmp[32];
format(tmp,sizeof(tmp),"%02d:%02d",GameMinutes,GameSeconds);
SetSVarString("TimeLeft", tmp);

Face9000
04/10/2015, 06:17 AM
Oh, thanks ;)