Server Crash
#1

First, here is my code:
pawn Код:
if(!strcmp(cmd, "/time")) {
  if(!IsPlayerInAnyVehicle(playerid) && !PlayerData[Clock][playerid]) {
  SendClientMessage(playerid, Red1, "Error: You do not have a clock.");
  return 1;
  }
    format(string, sizeof(string), "%s checks the time.");
    ProxDetector(20.0, playerid, string, COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    //format(string, sizeof(string), "~g~|~w~%d:%d~g~|", GameHour, GameMinute);
    format(string, sizeof(string), "%d %d", GameHour, GameMinute);
    GameTextForPlayer(playerid, string, 6000, 1);
    return 1;
  }
Whenever I use /time, my server crashes. Any ideas? Thanks.
Reply
#2

Код:
format(string, sizeof(string), "%s checks the time.");
There isn't a variable to be formatted into the string.
Reply
#3

Its always the simple mistakes, thanks
Reply


Forum Jump:


Users browsing this thread: