error 017: undefined symbol "text1"
Text: text1;
new gSeconds = 0;
new Text: gText; // global "Text"
forward TimeServerRunning();
SetTimer("TimeServerRunning", 1000, true);
public TimeServerRunning() {
new string[16];
TextDrawDestroy(gText);
gSeconds++;
format(string, sizeof string, "%s", TimeConvert(gSeconds));
text1 = TextDrawCreate(10.0, 100.0, string);
TextDrawUseBox(gText, true);
TextDrawTextSize(gText, 50.0, 20.0);
TextDrawShowForAll(gText);
}
TimeConvert(time) {
new minutes;
new seconds;
new string[256];
if(time > 59){
minutes = floatround(time/60);
seconds = floatround(time - minutes*60);
if(seconds>9)format(string,sizeof(string),"%d:%d",minutes,seconds);
else format(string,sizeof(string),"%d:0%d",minutes,seconds);
}
else{
seconds = floatround(time);
if(seconds>9)format(string,sizeof(string),"0:%d",seconds);
else format(string,sizeof(string),"0:0%d",seconds);
}
return string;
}
warning 204: symbol is assigned a value that is never used: "text1" |
text1 = TextDrawCreate(10.0, 100.0, string);
gText = TextDrawCreate(10.0, 100.0, string);
error 017: undefined symbol "text1"