Can you help me fix this CMD? Errors! - 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)
+--- Thread: Can you help me fix this CMD? Errors! (
/showthread.php?tid=391254)
Can you help me fix this CMD? Errors! -
pln102 - 10.11.2012
Hello there, i need some help
Код:
error 001: expected token: ";", but found "}"
error 001: expected token: ",", but found ";"
error 001: expected token: ";", but found "return"
Here is the CMD
Код:
CMD:mycars(playerid)
{
SendClientMessage(playerid, COLOR_WHITE, "|___Your vehicles:___|");
new string[60];
for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
{
if(PlayerVehicleInfo[playerid][v][pvModelId])
format(string, sizeof(string), "%d: {ADD8E6}%s{FFFFFF} | Lock: {ADD8E6}%s {FFFFFF}(%s{FFFFFF})");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string)
}
format(string, sizeof(string),"Number of cars: %d | Vehicle Limit: %d",GetPVarInt(playerid, "MaxCars");
SendClientMessage(playerid, COLOR_WHITE, string)
return 1;
}
Re: Can you help me fix this CMD? Errors! -
SuperViper - 10.11.2012
pawn Код:
CMD:mycars(playerid)
{
  SendClientMessage(playerid, COLOR_WHITE, "|___Your vehicles:___|");
  new string[60];
  for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
  {
     if(PlayerVehicleInfo[playerid][v][pvModelId])
      {
      format(string, sizeof(string), "%d: {ADD8E6}%s{FFFFFF}  | Lock: {ADD8E6}%s {FFFFFF}(%s{FFFFFF})");
      SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
      }
  }
  format(string, sizeof(string),"Number of cars: %d | Vehicle Limit: %d",GetPVarInt(playerid, "MaxCars");
  SendClientMessage(playerid, COLOR_WHITE, string);
  return 1;
}
Re: Can you help me fix this CMD? Errors! -
pln102 - 10.11.2012
But thanks but there still a error with the CMD still.
When i try to compliance its show this
Код:
(35880) : error 001: expected token: ",", but found ";""
Код:
CMD:mycars(playerid)
{
SendClientMessage(playerid, COLOR_WHITE, "|___Your vehicles:___|");
new string[60];
for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
{
if(PlayerVehicleInfo[playerid][v][pvModelId])
{
format(string, sizeof(string), "%d: {ADD8E6}%s{FFFFFF} | Lock: {ADD8E6}%s {FFFFFF}(%s{FFFFFF})");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
format(string, sizeof(string),"Number of cars: %d | Vehicle Limit: %d",GetPVarInt(playerid, "MaxCars");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
The line in red, that mean ERROR
Re: Can you help me fix this CMD? Errors! -
JaKe Elite - 10.11.2012
pawn Код:
format(string, sizeof(string),"Number of cars: %d | Vehicle Limit: %d",GetPVarInt(playerid, "MaxCars"));