AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved SetPackPosition - warning 213: tag mismatch (https://forums.alliedmods.net/showthread.php?t=291503)

iGANGNAM 12-12-2016 18:52

SetPackPosition - warning 213: tag mismatch
 
Code:

public CallBack_Top(Handle:owner, Handle:hndl, const String:error[], any:userid)
{
        if(!Timer_IsEnabled()) return;
        ErrorCheck(hndl, error, "CallBack_Top");
        new client = GetClientOfUserId(userid);
        if(!client || !IsClientInGame(client))
                return;

        new iIndex, iPoints;
        decl String:sName[32];
        if(SQL_GetRowCount(hndl))
        {
                new Handle:hPack = CreateDataPack();
                WritePackCell(hPack, iIndex);
                while(SQL_FetchRow(hndl))
                {
                        SQL_FetchString(hndl, 0, sName, sizeof(sName));
                        iPoints = SQL_FetchInt(hndl, 1);

                        WritePackString(hPack, sName);
                        WritePackCell(hPack, iPoints);

                        iIndex++;
                }

                SetPackPosition(hPack, 0);
                WritePackCell(hPack, iIndex);
                CreateTopMenu(client, hPack);
        }
        else
                CPrintToChat(client, "%t", "Phrase_Rank_None");
}

Hello. I had updated my compiler and having issue with SetPackPosition for some reason.
SetPackPosition(hPack, 0); <-- this line throws warning

ddhoward 12-12-2016 18:53

Re: SetPackPosition - warning 213: tag mismatch
 
https://sm.alliedmods.net/new-api/da...etPackPosition
https://sm.alliedmods.net/new-api/datapack/ResetPack

iGANGNAM 12-12-2016 19:07

Re: SetPackPosition - warning 213: tag mismatch
 
Thank you. Problem is solved! :)


All times are GMT -4. The time now is 21:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.