viewing paste Unknown #38084 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
        // Cash shop
        //?????????????????????????????????????????????? Normynator
        char *data;
        int value = -1;
       
        //debug
        ShowWarning("Currently at file pc.c line 1409 (account_id=%d, char_id=%d).\n", sd->status.account_id, sd->status.char_id); //INFO
       
        //select credits from db
        if (SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `value` FROM `acc_reg_num_db` WHERE `account_id` = '%d' AND `key` = '#CASHPOINTS'", sd->status.account_id)){
                Sql_ShowDebug(map->mysql_handle);
        }
                                               
        while (SQL_SUCCESS == SQL->NextRow(map->mysql_handle)) {
                SQL->GetData(map->mysql_handle, 0, &data, NULL); value = atoi(data);
                //chrif->authreq(sd,true); //not needed ?
        }
        SQL->FreeResult(map->mysql_handle);
       
        //debug
        ShowWarning("value=%d).\n", value);             //Result       
       
        //no value cap check because of its red from db on char login
        sd->cashPoints = value;//pc_readaccountreg(sd,script->add_str("#CASHPOINTS"));
Viewed 547 times, submitted by unknown.