How to switch from R6 to R39?
#8

Quote:
Originally Posted by Barnwell
View Post
pawn Code:
C:\Users\user\Desktop\FRP\gamemodes\FRP.pwn(4333) : error 035: argument type mismatch (argument 1)
pawn Code:
stock SaveTrunkSlot(playerid, slot)
{
    new sql[128];
    switch(slot)
    {
        case 0:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS1`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 1:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS2`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 2:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS3`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 3:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS4`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 4:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS5`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 5:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS6`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 6:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS7`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 7:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS8`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 8:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS9`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 9:  { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TS10`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 10: { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TDS1`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 11: { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TDS2`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
        case 12: { format(sql, sizeof(sql), "UPDATE `samp_trunks` SET `TDS3`=1 WHERE PlayerID='%d'", PlayerInfo[playerid][pDBID]); mysql_format(sql, THREAD_UPDATE, playerid); }
    }
    return 1;
}
mysql_format requires the connection handle as the first argument.

Code:
mysql_format(connectionHandle,sql,sizeof(sql),"bla bla",...);
Also, why do you use format and then mysql_format when you can do it all in mysql_format?
Reply


Messages In This Thread
How to switch from R6 to R39? - by Barnwell - 25.10.2016, 17:06
Re: How to switch from R6 to R39? - by Banditul18 - 25.10.2016, 18:13
Re: How to switch from R6 to R39? - by Barnwell - 25.10.2016, 18:26
Re: How to switch from R6 to R39? - by Vince - 25.10.2016, 18:46
Re: How to switch from R6 to R39? - by Barnwell - 25.10.2016, 18:50
Re: How to switch from R6 to R39? - by SickAttack - 25.10.2016, 18:52
Re: How to switch from R6 to R39? - by Barnwell - 25.10.2016, 18:53
Re: How to switch from R6 to R39? - by DTV - 26.10.2016, 02:31

Forum Jump:


Users browsing this thread: 1 Guest(s)