mysql_fetch_row R38
#1

What function mysql_fetch_row for MySQL R38 ? +R3P
Reply
#2

what do u mean? do you mean what is the meaning of mysql_fetch_row? it is a variable that fetch if there is a row with that name or not
Reply
#3

https://sampwiki.blast.hk/wiki/MySQL/R33#cache_get_row

also check the wiki for more mysql functions: https://sampwiki.blast.hk/wiki/MySQL/R33
Reply
#4

Код:
case 3:
                {
                    mysql_query(Mysql_users, "SELECT * FROM `"NAMU_LENTELE"`" );
                    mysql_store_result(Mysql_users );
                    new eile[ 90 ], i = 0;
                    while ( cache_get_row(eile, "|" ) && i < MAX_HOUSES )
                    {
                        if(GetPlayerMoney(playerid) < HouseData[i][Namokaina])
                        {
                            SendClientMessage(playerid,COLOR_RED,"Atsipraљome, bet jums nepakanka pinigų nusipirkti љį nąmą.");
                        }
                        else
                        {
                            GivePlayerMoney(playerid, -HouseData[i][Namokaina]);
                            SendClientMessage(playerid, -1,"{0080C0}Nusipirkote namą. Namo valdymas: /namas");
                            mysql_format(Mysql_users, query, sizeof(query), "UPDATE `"NAMU_LENTELE"` SET Savininkas='%s', Parduodamas='0', Pavadinimas='%s namas' WHERE `ID` = '%i'", PlayerData[playerid][Fullname], PlayerData[playerid][Fullname], HouseData[i][ID]);
                            mysql_tquery(Mysql_users, query, "", "");
                            HouseData[i][Parduodamas] = 0;
                            new Vardas[MAX_PLAYER_NAME];
                            format(HouseData[i][Savininkas], 64, "%s", Vardas);

                            HouseData[i][Savininkas] = Vardas;

                        }
                    }
                }
while ( cache_get_row(eile, "|" ) && i < MAX_HOUSES )

THIS LINE IM GOT ERROR:

error 035: argument type mismatch (argument 1)

UPDATE: this case buy house
Reply
#5

Actually because its un-correct way, checkout the wiki. also you're using outdated mysql functions ( not even exists in r33+ ).

You should do it like this.
pawn Код:
mysql_tquery(Mysql_users, "SELECT * FROM `NAMU_LENTELE`", "Load","","");

forward Load();
public Load()
{
    for(new i =0; i < MAX_HOUSES; i++)
    {
        cache_get_row(i,field,HouseData[i][Namokaina]);
        ///the rest here here
    }
}
Reply
#6

mysql_tquery(Mysql_users, "SELECT * FROM `NAMU_LENTELE`", "Load","","");

this on case 3: (buy house)? or ongamemodeinit

if ongamemodeinit i have this code
Reply
#7

Quote:
Originally Posted by TheNerka
Посмотреть сообщение
mysql_tquery(Mysql_users, "SELECT * FROM `NAMU_LENTELE`", "Load","","");

this on case 3: (buy house)? or ongamemodeinit

if ongamemodeinit i have this code
I don't know what are you doing you just provide a part of your script, also i can't understand what you mean with "this on case 3: (buy house)? or ongamemodeinit" i just gave you on example for how to use the r33+ functions, you have to modify it to your own.
Reply
#8

case 3: if im climb pickup have dialog im selected buy house and im get 50+ text flood "you bought house" (translated), but
mysql_tquery(Mysql_users, "SELECT * FROM `NAMU_LENTELE`", "Load","",""); code im already have in ongamemodeinit
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)