Some errors
#3

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
Why did you put [] in the forward/public ? you should add it only when it's a string.. and in that case it's an int.
mysql_real_escape_string uses an array (string) for the 1st and 2nd parameters, so changing them to integers will give warnings about tag mismatches.

---

The 3rd parameter should be an integer and you used it as an array.

pawn Код:
stock LogVehicleTransfer(seller[], buyer[], sellprice, senderid)
{
    new str[512], clean_name[MAX_PLAYER_NAME], clean_oname[MAX_PLAYER_NAME];
    mysql_real_escape_string(seller, clean_name);
    mysql_real_escape_string(buyer, clean_oname);
    format(str, sizeof(str), "INSERT INTO rp_vehicle_transfer_logs (seller,buyer,price) VALUES ('%s','%s',%d)", clean_name, clean_oname, sellprice);
    mysql_query(str, player_threads_alt[sellerid]);
}
By the way, you don't use senderid anywhere. Are you sure the the sellerid wasn't supposed to be the senderid?

pawn Код:
LogVehicleTransfer(oname, name, sellprice, playerid);
Make sure the parameters are:
oname -> string
name -> string
sellprice -> integer
playerid -> integer
Reply


Messages In This Thread
Some errors - by Jony_Cruze - 28.11.2013, 14:00
Re: Some errors - by xVIP3Rx - 28.11.2013, 14:09
Re: Some errors - by Konstantinos - 28.11.2013, 14:21
Re: Some errors - by Jony_Cruze - 28.11.2013, 14:42
Re: Some errors - by Konstantinos - 28.11.2013, 14:47
Re: Some errors - by Jony_Cruze - 28.11.2013, 14:53
Re: Some errors - by Konstantinos - 28.11.2013, 15:15
Re: Some errors - by Jony_Cruze - 28.11.2013, 16:05
Re: Some errors - by Konstantinos - 28.11.2013, 16:09
Re: Some errors - by Jony_Cruze - 28.11.2013, 16:34

Forum Jump:


Users browsing this thread: 3 Guest(s)