Error; C-MySQL.
#1

Hey i have an error please help me.
PHP код:
public OnQueryFinishquery[], resultidextraidconnectionHandle ) {
    new
        
QueryID 0,
        
string[1500];
    if(
resultid == 1) {
        
mysql_store_result();
        while(
mysql_fetch_row_format(string,"|"))
        {
                if(
mysql_num_rows() <= 0) continue;
                
sscanf(string"p<|>iffffiisiiiiiiiiiiiiiii",
                
CarInfo[QueryID][cModel], CarInfo[QueryID][cX],
                
CarInfo[QueryID][cY], CarInfo[QueryID][cZ], CarInfo[QueryID][cAngle],
                
CarInfo[QueryID][cColorOne], CarInfo[QueryID][cColorTwo],
                
CarInfo[QueryID][cOwner], CarInfo[QueryID][cOwned],
                
CarInfo[QueryID][cValue], CarInfo[QueryID][cLock],
                
CarInfo[QueryID][cFuel], CarInfo[QueryID][cDonate],
                
CarInfo[QueryID][cMod][0],CarInfo[QueryID][cMod][1],
                
CarInfo[QueryID][cMod][2], CarInfo[QueryID][cMod][3],
                
CarInfo[QueryID][cMod][4], CarInfo[QueryID][cMod][5],
                
CarInfo[QueryID][cMod][6], CarInfo[QueryID][cMod][7],
                
CarInfo[QueryID][cMod][8], CarInfo[QueryID][cMod][9]);
                
QueryID ++;
            } 
//Ends While
            
mysql_free_result();
        } 
//Ends Case
        
if(resultid == MySQL_QUERY_LOGIN) {
        
mysql_store_result();
        if(
mysql_num_rows() >= 1) {
        
mysql_fetch_row_format(string"|");
        print(string);
        new 
ustring[5];
        
sscanf(string"p<|>s[5]s[5]iiiifffffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiis[5]s[5]s[128]iiiiiiiiiis[5]",
        
ustringustringPlayerInfo[extraid][pCash], PlayerInfo[extraid][pModel], PlayerInfo[extraid][pCrash],
        
PlayerInfo[extraid][pAge], PlayerInfo[extraid][pPosX], PlayerInfo[extraid][pPosY],PlayerInfo[extraid][pPosZ],
        
PlayerInfo[extraid][pHealth], PlayerInfo[extraid][pArmour], PlayerInfo[extraid][pInt], PlayerInfo[extraid][pWorld],
        
PlayerInfo[extraid][pPayDay], PlayerInfo[extraid][pPayCheck], PlayerInfo[extraid][pBank], PlayerInfo[extraid][pConnectTime], PlayerInfo[extraid][pMember],
        
PlayerInfo[extraid][pRank], PlayerInfo[extraid][pWeed], PlayerInfo[extraid][pCrack],PlayerInfo[extraid][pCocaine],
        
PlayerInfo[extraid][pHouseKey], PlayerInfo[extraid][pBizzKey],PlayerInfo[extraid][pCarKey1], PlayerInfo[extraid][pCarKey2], PlayerInfo[extraid][pCarKey3], PlayerInfo[extraid][pAdmin], PlayerInfo[extraid][pHelper],
        
PlayerInfo[extraid][pBanned], PlayerInfo[extraid][pDrugTime], PlayerInfo[extraid][pHouseEnter], PlayerInfo[extraid][pBizzEnter],
        
PlayerInfo[extraid][pGunLic], PlayerInfo[extraid][pDriveLic], PlayerInfo[extraid][pPhoneNum], PlayerInfo[extraid][pJob], PlayerInfo[extraid][pJailed],
        
PlayerInfo[extraid][pJailTime], PlayerInfo[extraid][pWeapon][0],
        
PlayerInfo[extraid][pWeapon][1], PlayerInfo[extraid][pWeapon][2], PlayerInfo[extraid][pWeapon][3],
        
PlayerInfo[extraid][pWeapon][4], PlayerInfo[extraid][pWeapon][5], PlayerInfo[extraid][pWeapon][6],
        
PlayerInfo[extraid][pWeapon][7], PlayerInfo[extraid][pWeapon][8], PlayerInfo[extraid][pWeapon][9],
        
PlayerInfo[extraid][pWeapon][10], PlayerInfo[extraid][pWeapon][11], PlayerInfo[extraid][pWeapon][12],
        
PlayerInfo[extraid][pAmmo][0],PlayerInfo[extraid][pAmmo][1],PlayerInfo[extraid][pAmmo][2],
        
PlayerInfo[extraid][pAmmo][3], PlayerInfo[extraid][pAmmo][4], PlayerInfo[extraid][pAmmo][5],
        
PlayerInfo[extraid][pAmmo][6], PlayerInfo[extraid][pAmmo][7], PlayerInfo[extraid][pAmmo][8],
        
PlayerInfo[extraid][pAmmo][9], PlayerInfo[extraid][pAmmo][10], PlayerInfo[extraid][pAmmo][11],
        
PlayerInfo[extraid][pAmmo][12], PlayerInfo[extraid][pWantedLevel], PlayerInfo[extraid][pDonateRank],
        
PlayerInfo[extraid][pMask], PlayerInfo[extraid][pMaskID], PlayerInfo[extraid][pCellphone],
        
PlayerInfo[extraid][pCrimes], PlayerInfo[extraid][pArrest], PlayerInfo[extraid][pChanges], ustring,
        
ustringPlayerInfo[extraid][pAdmName], extraidextraidPlayerInfo[extraid][pSex], PlayerInfo[extraid][pTut],
        
PlayerInfo[extraid][pCarTicket], extraidextraidextraidextraidextraidustring);
        } 
//Ends mysql_fetch_row_format
        
new ppname[24], testline0testline1testline2testline3testline4;
        
GetPlayerName(extraidppname24);
        
testline0 CMySQL_Set(ppname"Accounts""Username""CarTicket"); // line; 2547
        
testline1 CMySQL_Set(ppname"Accounts""Username""Tutorial");// line; 2548
        
testline2 CMySQL_Set(ppname"Accounts""Username""Sex"); //line; 2549
        
testline3 CMySQL_Set(ppname"Accounts""Username""Changes");//line; 2550
        
testline4 CMySQL_Get(ppname"Accounts""Username""AdmName");//line; 2551
        
PlayerInfo[extraid][pCarTicket] = testline0;
        
PlayerInfo[extraid][pTut] = testline1;
        
PlayerInfo[extraid][pSex] = testline2;
        
PlayerInfo[extraid][pChanges] = testline3;
        
strmid(PlayerInfo[extraid][pAdmName], testline40strlen(CMySQL_Get(ppname"Accounts""Username""AdmName")), 255);// line; 2556
        
mysql_free_result();
        
OnLoginInit(extraid);
        } 
//Finishes IF
        
if(resultid != && resultid != MySQL_QUERY_LOGIN)
        {
        if(
PlayerInfo[extraid][pWrongPassword] >= 5)
        {
        
SendClientMessage(extraid,COLOR_LIGHTRED,"SERVER: You have been banned for entering the wrong password in five times.");
        
BanEx(extraid,"Wrong Password");
        }
        else
        {
        
PlayerInfo[extraid][pWrongPassword]++;
        
SendClientMessage(extraid,COLOR_LIGHTRED,"SERVER: Invalid password.");
        }
        }
        }
        return 
1;//line; 2574

The Error;
PHP код:
(2547) : error 035argument type mismatch (argument 4)
(
2548) : error 035argument type mismatch (argument 4)
(
2549) : error 035argument type mismatch (argument 4)
(
2550) : error 035argument type mismatch (argument 4)
(
2551) : error 035argument type mismatch (argument 4)
(
2556) : error 035argument type mismatch (argument 2)
(
2551) : warning 204symbol is assigned a value that is never used"testline4"
(2574) : error 010invalid function or declaration
7 Errors
// The lines you can find on the script is marked. 
Reply
#2

pawn Код:
(2547) : error 035: argument type mismatch (argument 4)
(2548) : error 035: argument type mismatch (argument 4)
(2549) : error 035: argument type mismatch (argument 4)
(2550) : error 035: argument type mismatch (argument 4)
(2551) : error 035: argument type mismatch (argument 4)
(2556) : error 035: argument type mismatch (argument 2)
The errors tell you what's wrong.

An argument is a variable passed to a function. For example
pawn Код:
function(argument1, argument2); // etc
So the errors are telling you that you're putting in the wrong argument in the 4th or second one. Check the documentation for C-MySQL to see how to fix it.

The last error might be due to bad indentation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)