SA-MP Forums Archive
Dialog doesnt get the info properly - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog doesnt get the info properly (/showthread.php?tid=447539)



Dialog doesnt get the info properly - thimo - 30.06.2013

Okay so i want to get it reading the value from the database and get it added by APlayerData[playerid][Ecoins]

This is the code:
pawn Код:
switch(response)
    {
        case 1:
        {
            new string3[128];
            format(string3, sizeof(string3), "SELECT * FROM Donates WHERE serial = '%s'", inputtext);
            mysql_query(string3);
           
            mysql_store_result();

            new value;
            value = mysql_num_rows();
            new row[200]; // The length of 1 'row' total.
            new field[14][200]; // [4] = Amount of fields, [24] = Max length of the bigest field.

            mysql_fetch_row_format(row, "|");
            explode(row, field, "|");
            mysql_free_result();
            if(value == 1)
            {
                new Coins;
                Coins = strval(field[2]);
                APlayerData[playerid][ECoins] += Coins;
                SavePlayer(playerid);
            }
        }
    }