MySQL Error
#1

PHP код:
    new Query[256];
    
format(Querysizeof(Query), "SELECT * FROM Accounts WHERE Username = '%s' AND Banned = '1'"pName(playerid));
    
mysql_function_query(Query);
    
mysql_store_result();
    if(
mysql_num_rows() == 0)
    {
        
SetPlayerVirtualWorld(playerid0);
        
SetPlayerInterior(playerid0);
        
TogglePlayerSpectating(playeridtrue);
        
SetTimerEx("FirstCam"9990"i"playerid);
        for(new 
i=0;i<47;i++) Weapon[playerid][i] = false;
         
PickupsTimer[playerid] = SetTimerEx("PickupMessages"1500true"i"playerid);
        new 
string[128];
        
OnPhone[playerid] = 0;
        
MaskOn[playerid] = 0;
        
SetWorldTime(Hour);
        
CalledPolice[playerid] = 0;
        
InBusiness[playerid] = -1;
        
CheckReady[playerid] = 0;
        
ClothesSelected[playerid] = 0;
        
CalledMedics[playerid] = 0;
        
MaskNumber[playerid] = -1;
        
ToggedDOOC[playerid] = 0;
        
Spectating[playerid] = 0;
        
VehicleSell[playerid] = -1;
        
ClickStop[playerid] = 0;
        
HouseSell[playerid] = -1;
        
Fishing[playerid] = 0;
        
nMuted[playerid] = 0;
        
KillTimer(NewbieTimer[playerid]);
        
Fined[playerid] = -1;
        
masklabel[playerid] = Create3DTextLabel(" "GREY, -1.0, -1.0, -1.0, -1.00);
        
Attach3DTextLabelToPlayer(masklabel[playerid], playerid0.00.00.7);
        
FinePrice[playerid] = 0;
        
CocaineSell[playerid] = -1;
        
CocaineSellPrice[playerid] = -1;
        
CocaineSellAmount[playerid] = -1;
        
MethSell[playerid] = -1;
        
MethSellPrice[playerid] = -1;
        
MethSellAmount[playerid] = -1;
        
WeedSell[playerid] = -1;
        
WeedSellPrice[playerid] = -1;
        
WeedSellAmount[playerid] = -1;
        
WeaponSell[playerid] = 0;
        
WeaponTo[playerid] = -1;
        
WeaponPrice[playerid] = -1;
        
WeaponAmmo[playerid] = -1;
        
WeaponGun[playerid] = 0;
        
HouseSellPrice[playerid] = -1;
        
VehicleSellPrice[playerid] = -1;
        
ToggedNewbie[playerid] = 0;
        
PlayerCuffed[playerid] = 0;
        
WeedPlanted[playerid] = 0;
        
DrugCount[playerid] = 0;
        
WeedReady[playerid] = 0;
        
CanSweep[playerid] = 0;
        
CanPizza[playerid] = 0;
        
CanCoal[playerid] = 0;
        
WeedPlantX[playerid] = -1.0;
        
WeedPlantY[playerid] = -1.0;
        
WeedPlantZ[playerid] = -1.0;
        
KillTimer(ArrestTimer[playerid]);
        
KillTimer(DrugTimer[playerid]);
        
KillTimer(AJailTimer[playerid]);
        
GoldON[playerid] = 0;
        
ToggedOOC[playerid] = 0;
        
ShakeRequested[playerid] = -1;
        
aDuty[playerid] = 0;
        
pDuty[playerid] = 0;
        
DraggedBy[playerid] = -1;
        
Dragging[playerid] = -1;
        
mDuty[playerid] = 0;
        
mPager[playerid] = 0;
        
InAnimation[playerid] = 0;
        
gPlayerAnimLibsPreloaded[playerid] = 0;
        
CoalMining[playerid] = 0;
        
Pizza[playerid] = 0;
        
Sweeping[playerid] = 0;
        
NumberCalled[playerid] = -1;
        
Calling[playerid] = -1;
        
pTazer[playerid] = 0;
        
IStartedNews[playerid] = 0;
        
pTazed[playerid] = 0;
        
PoliceStep[playerid] = 0;
        
WaitingTime[playerid] = 0;
        
InvitedTo[playerid] = 0;
        
Hospitalized[playerid] = 0;
        
format(SQL_Query,sizeof(SQL_Query),"SELECT Username FROM `Accounts` WHERE `Username` = '%s'",pName(playerid));
        
mysql_function_query(SQL_Query); // Error Line!!!
        
mysql_store_result();
        
SetPlayerColor(playeridTRANSPARENT); 
I Got error 035: argument type mismatch (argument 1)
Please,Help Me..
Reply
#2

You are mixing up two versions of the MySQL plugin.

mysql_function_query () (R7) has a different parameter list than mysql_query() (R6)

Also, the R7 plugin does not use the mysql_store_result() functions.

For more info, please refer to this thread
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)