Jump to content

andybe

Members
  • Content Count

    13
  • Joined

  • Last visited

Posts posted by andybe


  1. nein - bei deinem Nam egeh ich mal davon aus, dass du deutsch bist.
    ich glaube im code hast du soweit alles richtig gemacht.

    das Problem kommt beim Abspeichern der der Daten in der Datenbank auf.

    Du kennst dich wohl nicht sehr gut mit sql aus.

    In sql werden datensätze in SPalten abgespeichert, wobei jede Spalte insbesondere nicht nur einen Namen trägt um die dort gespeicherten daten wieder zu finden sondern auch einen datentyp.

     

    Sprich wenn du eine Tabelle anlegts und dort eine Spalte mit "name" anlegst dann wirst du dieser Spalte vorzugsweise auch den datentyp CHAR(character) oder sogar STRING geben wollen. eine SPalte mit ID wird in der regel mit einem INT belegt. das Bedeutet jedoch, das die ID natürlich nurnoch aus ziffern bestehen kann.

    was dir also passiert: die Tabelle sieht für die itemid nur SHORT vor du willst dort nun aber einen LONG abspeichern. Der passt da natürlich nicht rein :P

    was du  nun machen kannst ist die Tabelle editieren und die Spalte für die Itemid raussuchen dort wirst du das SHORT Tag sicherlich irgendwo finden (genau kann ich dir das nicht sagen, denn jede sql software sieht natürlich anders aus) und änderst es in deinen UNSIGNED_LONG um.


  2. sadly that's something entirely different and won't allow for on the fly map server transfers or seamless region changes :/

    but even reactivating the deprecated code a server change doesnt seem possible and would require a lengthy rewrite of code and data structures.

    I guess I'll give up on my project for now. But ty for the info


  3. I remember this had worked fine with rathena.

    Does herc support this too?

    Asking cause I'm having trouble.

    2nd map server always crashes with fatal error 3 when trying to connect to char server. Now I'm woondering whether it's my setup and configurations or herc just won't allow it.

     

    Should you be curious: this would be called clustering and is relevant in creating instances, channels or even regional zones within one and the same server network.


  4. hi, I'm currently reviewing battleground.c

    but I'm stuck at this part of the code.

    for (i = 0; i < VECTOR_LENGTH(queue->entries); i++) {
    			struct map_session_data *sd = map->id2sd(VECTOR_INDEX(queue->entries, i));
    
    			if (sd == NULL || sd->bg_queue.ready != 1)
    				continue;
    			int uid = reference_uid(script->add_str("$@bg_member"), count);
    #ifdef TRACE
    			ShowXilero("BG begin uid $@bg_member %d\n", uid);
    #endif
    
    			mapreg->setreg(uid, sd->status.account_id);
    			mapreg->setreg(reference_uid(script->add_str("$@bg_member_group"), count),
    			               sd->bg_queue.type == BGQT_GUILD ? sd->status.guild_id :
    			               sd->bg_queue.type == BGQT_PARTY ? sd->status.party_id :
    			               0
    			               );
    			mapreg->setreg(reference_uid(script->add_str("$@bg_member_type"), count),
    			               sd->bg_queue.type == BGQT_GUILD ? 1 :
    			               sd->bg_queue.type == BGQT_PARTY ? 2 :
    			               0
    			               );
    			count++;
    		}
    		mapreg->setreg(script->add_str("$@bg_member_size"),count);


     

    particularly

    mapreg->setreg(reference_uid(script->add_str("$@bg_member"), count), sd->status.account_id);

    i pieced that up to debug what is happening.

    I noticed that they all adress the same variable with the same uid, thus the data is overwriting each other in each loop. SO all the individual playerdata is lost. It feels to me like that is not intentional and neither going to work out well.

    I placed this in scripting topic as using mapreg is obviously relevant to scripting.

    This directly leads to the question how to best adress to that variable in script. Is there a way to create an array with mapreg->setreg? that way we can iterate through the arrays and process the data accordingly for each member of the queue

     

    thanks if anyone can clear that up for me

×
×
  • Create New...

Important Information

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