SA-MP Forums Archive
Server Crash - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Server Crash (/showthread.php?tid=82971)



Server Crash - zallomallo - 21.06.2009

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.


Re: Server Crash - XPlatform - 21.06.2009

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


Re: Server Crash - zallomallo - 21.06.2009

Its always the simple mistakes, thanks