SA-MP Forums Archive
expression has no effect - 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: expression has no effect (/showthread.php?tid=312484)



expression has no effect - rati555 - 21.01.2012

pawn Код:
public LoadCar()
{
  mysql_query("SELECT * FROM `vehicles`");
  mysql_store_result();
  if(mysql_num_rows())
  {
   new
    result[512],
    i = 0;
   while(mysql_fetch_row_format(result, "|"))
   {
    sscanf(result,"p<|>iffffiis[32]s[32]iiii");
    CarInfo[i][cModel], // 9713
    CarInfo[i][cLocationx],
    CarInfo[i][cLocationy],
    CarInfo[i][cLocationz],
    CarInfo[i][cAngle],
    CarInfo[i][cColorOne],
    CarInfo[i][cColorTwo],
    CarInfo[i][cOwner],
    CarInfo[i][cDescription],
    CarInfo[i][cValue],
    CarInfo[i][cOwned],
    CarInfo[i][cLock],
    printf("CarInfo: %d Owner:%s", i, CarInfo[i][cOwner]);
    i++;
    mysql_next_row();
   }
   mysql_free_result();
  }
  else print("The table is empty!");
  return 1;
}
Warnings
Код:
rati.pwn(9713) : warning 215: expression has no effect
rati.pwn(9713 -- 9714) : warning 215: expression has no effect
rati.pwn(9713 -- 9715) : warning 215: expression has no effect
rati.pwn(9713 -- 9716) : warning 215: expression has no effect
rati.pwn(9713 -- 9717) : warning 215: expression has no effect
rati.pwn(9713 -- 9718) : warning 215: expression has no effect
rati.pwn(9713 -- 9719) : warning 215: expression has no effect
rati.pwn(9713 -- 9720) : warning 215: expression has no effect
rati.pwn(9713 -- 9721) : warning 215: expression has no effect
rati.pwn(9713 -- 9722) : warning 215: expression has no effect
rati.pwn(9713 -- 9723) : warning 215: expression has no effect
rati.pwn(9713 -- 9724) : warning 215: expression has no effect



Re: expression has no effect - sabretur - 21.01.2012

pawn Код:
public LoadCar()
{
  mysql_query("SELECT * FROM `vehicles`");
  mysql_store_result();
  if(mysql_num_rows())
  {
   new
    result[512],
    i = 0;
   while(mysql_fetch_row_format(result, "|"))
   {
    sscanf(result,"p<|>iffffiis[32]s[32]iiii");
    printf("CarInfo: %d Owner:%s", i, CarInfo[i][cOwner]);
    i++;
    mysql_next_row();
   }
   mysql_free_result();
  }
  else print("The table is empty!");
  return 1;
}



Re: expression has no effect - rati555 - 21.01.2012

Quote:
Originally Posted by sabretur
Посмотреть сообщение
pawn Код:
public LoadCar()
{
  mysql_query("SELECT * FROM `vehicles`");
  mysql_store_result();
  if(mysql_num_rows())
  {
   new
    result[512],
    i = 0;
   while(mysql_fetch_row_format(result, "|"))
   {
    sscanf(result,"p<|>iffffiis[32]s[32]iiii");
    printf("CarInfo: %d Owner:%s", i, CarInfo[i][cOwner]);
    i++;
    mysql_next_row();
   }
   mysql_free_result();
  }
  else print("The table is empty!");
  return 1;
}
does it load whole "CarInfo" from mysql