Jump to content

joaolipinski

Members
  • Content Count

    13
  • Joined

  • Last visited

Posts posted by joaolipinski


  1. excuse revive the topic but I am an error and could not solve

     

    ERROR
    vending.c: In function ‘vending_closevending’:vending.c:63: error: ‘SQL_ERROR’ undeclared (first use in this function)
    vending.c:63: error: (Each undeclared identifier is reported only once
    vending.c:63: error: for each function it appears in.)
    vending.c:63: error: ‘SQL’ undeclared (first use in this function)
    vending.c:64: warning: implicit declaration of function ‘Sql_ShowDebug’
    vending.c:64: warning: nested extern declaration of ‘Sql_ShowDebug’
    vending.c: In function ‘vending_purchasereq’:
    vending.c:205: error: too few arguments to function ‘clif->vendingreport’
    vending.c:209: error: ‘SQL_ERROR’ undeclared (first use in this function)
    vending.c:209: error: ‘SQL’ undeclared (first use in this function)
    vending.c: In function ‘vending_openvending’:
    vending.c:336: error: ‘SQL_ERROR’ undeclared (first use in this function)
    vending.c:336: error: ‘SQL’ undeclared (first use in this function)
    
     

     

     

    I applied in this source

     

    diff --git a/src/map/unit.c b/src/map/unit.cindex 22c7165..9b0aa6a 100644
    --- a/src/map/unit.c
    +++ b/src/map/unit.c
    @@ -2135,6 +2135,9 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
                     chat->leavechat(sd,0);
                 if(sd->trade_partner)
                     trade->cancel(sd);
    +            //vending to db [Sanasol]
    +            vending->close(sd);
    +            //vending to db [Sanasol]
                 buyingstore->close(sd);
                 searchstore->close(sd);
                 if(sd->state.storage_flag == 1)
    diff --git a/src/map/vending.c b/src/map/vending.c
    index 2784d46..0f213a2 100644
    --- a/src/map/vending.c
    +++ b/src/map/vending.c
    @@ -37,6 +37,10 @@ void vending_closevending(struct map_session_data* sd) {
         if( sd->state.vending ) {
             sd->state.vending = false;
             clif->closevendingboard(&sd->bl, 0);
    +        //vending to db [Sanasol]
    +        if( SQL_ERROR == SQL->Query(map->mysql_handle,"delete from `vending` where `char_id`='%d'", sd->status.char_id) )
    +        Sql_ShowDebug(map->mysql_handle);
    +        //vending to db [Sanasol]
             idb_remove(vending->db, sd->status.char_id);
         }
     }
    @@ -174,7 +178,18 @@ void vending_purchasereq(struct map_session_data* sd, int aid, unsigned int uid,
             vsd->vending[vend_list[i]].amount -= amount;
             pc->cart_delitem(vsd, idx, amount, 0, LOG_TYPE_VENDING);
             clif->vendingreport(vsd, idx, amount);
    -
    +        //vending to db [Sanasol]
    +        if(vsd->vending[vend_list[i]].amount >= 1)
    +        {
    +            if( SQL_ERROR == SQL->Query(map->mysql_handle,"update `vending` set `amount`='%d' where `char_id`='%d' and `index`='%d'", vsd->vending[vend_list[i]].amount, vsd->status.char_id, vend_list[i]) )
    +                Sql_ShowDebug(map->mysql_handle);
    +        }
    +        else
    +        {
    +            if( SQL_ERROR == SQL->Query(map->mysql_handle,"delete from `vending` where `char_id`='%d' and `index`='%d'", vsd->status.char_id, vend_list[i]) )
    +                Sql_ShowDebug(map->mysql_handle);
    +        }
    +        //vending to db [Sanasol]
             //print buyer's name
             if( battle_config.buyer_name ) {
                 char temp[256];
    @@ -281,6 +296,19 @@ void vending_openvending(struct map_session_data* sd, const char* message, const
         safestrncpy(sd->message, message, MESSAGE_SIZE);
    
    
         clif->openvending(sd,sd->bl.id,sd->vending);
    +     //vending to db [Sanasol]
    +    for( j = 0; j < count; j++ )
    +    {
    +        int index = sd->vending[j].index;
    +        struct item_data* data = itemdb->search(sd->status.cart[index].nameid);
    +        int nameid = ( data->view_id > 0 ) ? data->view_id : sd->status.cart[index].nameid;
    +        int amount = sd->vending[j].amount;
    +        int price = cap_value(sd->vending[j].value, 0, (unsigned int)battle_config.vending_max_value);
    +        
    +        if( SQL_ERROR == SQL->Query(map->mysql_handle,"INSERT INTO `vending` (`char_id`,`name`,`index`,`nameid`,`amount`,`price`,`refine`,`card0`,`card1`,`card2`,`card3`) VALUES (%d, '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", sd->status.char_id, message, j, nameid, amount, price, sd->status.cart[index].refine, sd->status.cart[index].card[0], sd->status.cart[index].card[1], sd->status.cart[index].card[2], sd->status.cart[index].card[3]) )
    +        Sql_ShowDebug(map->mysql_handle);
    +    }
    +    //vending to db [Sanasol]
         clif->showvendingboard(&sd->bl,message,0);
         
         idb_put(vending->db, sd->vender_id, sd);
    
     

  2. cara primeiro de tudo, não eu nao uso cronus a muito tempo.... segundo eu fiz uma pergunta pra saber se alguem tem... nao tens, ou nao tens vontade de ajudar ? entao nao venha ficar postando bobagem só pra almentar seu numero de posts.... 

    alguns aqui pegaram a mania de falar mal de quem usa isso ou usa aquilo... falar mal de quem pede um simples npc que tem milhares iguais no google....

    depois ninguem sabe o por que falam tão mal da comunidade br u.u

     

    e outra meu amigo, eu sou scripter a no minimo uns 7anos porem não estou vontade de rippar esses eventos pois faz algum tempo que nao crio nada e os script do hercules usa uma linha de comando que eu ainda nao estudei... 

     

     

     

     

    (caso alguem queira eu já rippei o corrida maluca, arena da caça, e sobrevivencia... mais tarde posto pra glr ^^)

    agora só preciso do evento sortudo se alguem tiver pra me disponibilizar mt obrigado.


  3. olá pessoal... gostaria de saber se alguem tem os npc evento sortudo, arena da caça, corrida maluca... andei procurando o unico que achei foi o corrida maluca do cronus e não está funcionando no hercules....

     

    gostaria de saber tambem se os npc do cronus funcionam no hercules pois ja tentei varios e nao consegui... tem que converter ou algo do tipo pra funcionar ?


  4. consegui achar outro tutorial de como instalar o xml dom...  ( o comando no linux centos é "sudo yum install php-xml" e depois "sudo service httpd restart" )

     

    porem agora aparece o seguinte erro...

     

     

     

    Error: PagSeguroServiceException

    Message: [HTTP 401] - UNAUTHORIZED

    File: /var/www/html/addons/donates/lib/service/PagSeguroPaymentService.class.php:74

    File Line Function/Method /var/www/html/addons/donates/lib/domain/PagSeguroPaymentRequest.class.php 600 PagSeguroPaymentService::createCheckoutRequest() /var/www/html/addons/donates/modules/doa/process.php 40 PagSeguroPaymentRequest::register() /var/www/html/lib/Flux/Template.php 375 include() /var/www/html/lib/Flux/Dispatcher.php 170 Flux_Template::render() /var/www/html/index.php 180 Flux_Dispatcher::dispatch() Exception Trace As String#0 /var/www/html/addons/donates/lib/domain/PagSeguroPaymentRequest.class.php(600): PagSeguroPaymentService::createCheckoutRequest(Object(PagSeguroAccountCredentials), Object(PagSeguroPaymentRequest))
    #1 /var/www/html/addons/donates/modules/doa/process.php(40): PagSeguroPaymentRequest->register(Object(PagSeguroAccountCredentials))
    #2 /var/www/html/lib/Flux/Template.php(375): include('/var/www/html/a...')
    #3 /var/www/html/lib/Flux/Dispatcher.php(170): Flux_Template->render()
    #4 /var/www/html/index.php(180): Flux_Dispatcher->dispatch(Array)
    #5 {main}

  5. olá, desculpe reviver o topico... não sei se estou configurando alguma coisa errada porem no meu fluxcp quando eu clico em "doar" ele da um erro... criei um topico hj mais cedo acredito que na area errada... só agora fui ver seu post aqui...

     

     

     

    Exception Details

    Error: Exception

    Message: PagSeguroLibrary: DOM XML extension is required.

    File: /var/www/html/addons/donates/lib/PagSeguroLibrary.php:73

    File Line Function/Method /var/www/html/addons/donates/lib/PagSeguroLibrary.php 50 PagSeguroLibrary::verifyDependencies() /var/www/html/addons/donates/lib/PagSeguroLibrary.php 111 PagSeguroLibrary::init() /var/www/html/addons/donates/modules/doa/process.php 4 require_once() /var/www/html/lib/Flux/Template.php 375 include() /var/www/html/lib/Flux/Dispatcher.php 170 Flux_Template::render() /var/www/html/index.php 180 Flux_Dispatcher::dispatch() Exception Trace As String#0 /var/www/html/addons/donates/lib/PagSeguroLibrary.php(50): PagSeguroLibrary::verifyDependencies()
    #1 /var/www/html/addons/donates/lib/PagSeguroLibrary.php(111): PagSeguroLibrary::init()
    #2 /var/www/html/addons/donates/modules/doa/process.php(4): require_once('/var/www/html/a...')
    #3 /var/www/html/lib/Flux/Template.php(375): include('/var/www/html/a...')
    #4 /var/www/html/lib/Flux/Dispatcher.php(170): Flux_Template->render()
    #5 /var/www/html/index.php(180): Flux_Dispatcher->dispatch(Array)
    #6 {main}

  6. (in english)

    excuse me if this is not the place...

    I'm with the problem in a Addon FluxCP (PagSeguro)

    he is showing me the following message when you complete the "donation"

     

    (em portugues)
    desculpe-me se este não é o lugar ...
    Eu estou com o problema de uma Addon FluxCP (PagSeguro)
    ele está me mostrando a seguinte mensagem quando você completar a "doação"
     
     

     

     

    Error: Exception

    Message: PagSeguroLibrary: DOM XML extension is required.

    File: /var/www/html/addons/donates/lib/PagSeguroLibrary.php:73

     

     

     
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.