tag mismatch
#1

Well, I don't know what the problem is, I've tried reading stuffs about cache_get_row_count but still can't fix it somehow.

PHP код:
forward CheckStorageTent(playerid);
public 
CheckStorageTent(playerid)
{
    if(
cache_get_row_count(handle) == 5)
    {
        return 
SendClientMessage(playerid, -1"You own 5 tents already!");
    }
    else
    {
        new 
tentid GetPlayerStorageTentID(playerid), _content[128], _query[190];
        if(
tInfo[tentid][tOwnerID] != -1) return SendClientMessage(playerid, -1"* "COL_RED"This storage tent was already saved!") && ApplyAnimation(playerid"CAMERA""camcrch_to_camstnd"5000010001);
        if(
pInfo[playerid][pzCoins] < 50) return SendClientMessage(playerid, -1"* "COL_RED"You can't afford this, you have less than 50 zCoins!") && ApplyAnimation(playerid"CAMERA""camcrch_to_camstnd"5000010001);
        
format(_contentsizeof(_content), ""COL_YELLOW"Private Storage Tent\n"COL_WHITE"Owner: "COL_GREEN"%s\n"COL_WHITE"Press '"COL_PINK"LALT"COL_WHITE"' to interact"pInfo[playerid][pUsername]);
        
tInfo[tentid][tOwnerID] = pInfo[playerid][pID];
        
strcpy(tInfo[tentid][tOwnerName], pInfo[playerid][pUsername], MAX_PLAYER_NAME);
        
UpdateDynamic3DTextLabelText(tInfo[tentid][tLabel], -1_content);
        
pInfo[playerid][pzCoins] -= 50;
        
SendClientMessage(playerid, -1"* "COL_DIALOG"You have saved this storage tent successfully");
        
ApplyAnimation(playerid"CAMERA""camcrch_to_camstnd"5000010001);
        
mysql_format(handle_querysizeof(_query), "INSERT INTO `storage_tent` (`tentID`, `Owner ID`, `Owner Name`, `PosX`, `PosY`, `PosZ`, `Angle`) VALUES(%d, %d, '%e', %f, %f, %f, %f)"tentidtInfo[tentid][tOwnerID], tInfo[tentid][tOwnerName], tInfo[tentid][tPosX], tInfo[tentid][tPosY], tInfo[tentid][tPosZ], tInfo[tentid][tAngle]);
        
mysql_tquery(handle_query);
    }
    return 
1;

The warning:

Код:
warning 213: tag mismatch: expected tag none ("_"), but found "MySQL"
Line:

PHP код:
if(cache_get_row_count(handle) == 5
Reply
#2

Read wiki first if you are new to mysql, or use sublime text with samp pawn support to helping you knowing the function of mysql.

cache_get_row_count = getting the row result, like if you have a 5 row, then this gonna store to var not connection handle.

PHP код:
new rows;
cache_get_row_count(rows);
if(
rows >= 5)
{
    
//do something here
}
else
{

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)