client crash after entering worldserver

I'm sure there will be a TON of bugs discovered. List them here and we will cross them off the list as they are fixed.

client crash after entering worldserver

Postby wouter2004 on Fri Jan 19, 2018 11:17 am

Dear All,

First of all thanks for sharing the server- and client code with the instructions how to build them.

After downloading the donor client Rose Evo v137 and installing server with the respective database, I am able to logon, create a character and press start to play in the character selection screen.

However when I enter the Worldserver, the client crashes and the World server prompt many warnings which doesn't seems right. You will find the warnings in the attached picture.

So here is what I did:

After installing the donor client, I have extracted all the VFS files to a separate directory and copied these including all subdirectories to the 3DDATA folder inside the donor client. after that I overwrite the 3DData folder with the one provided on this forum. Then I copied the client files from the Wiggle Wiggle git project into the donor client root folder. This includes the pre-compiled TRose.exe the DLL files and the ROSEonline.exe. Finally I launched the game with the launcher.bat which directs to the correct IP address.


Update:
After waiting for a while I get the option to debug and then I see there is no Just in Time Debugger enabled. Any help would be appreciated. :o


Do I perhaps miss an import step? Please advise.

Cheers,
Wouter
Attachments
Capture.PNG
debug error
Capture.PNG
client
Capture.PNG
server console
wouter2004
Little soul
Little soul
 
Posts: 6
Joined: Wed Jan 17, 2018 11:33 am

Re: client crash after entering worldserver

Postby PurpleYouko on Fri Jan 19, 2018 3:34 pm

Can you take a look in the client log to see what the last successful code was. You will find it in the client's log folder

The debugger error is simply because you just ran the executables rather than actually compiling the source in visual studio. There is no debug file on your local drive for it to access.

The reason for this kind of crash is a little harder to pin down. I still get it myself some of the time. It appears to be something related to either the client losing focus during load up OR some bad data being sent to the client during the character loading process.
The error is in the Client, not the server so your third picture (server stuff) isn't connected to any kind of error.

When I get this kind of crash I can often get it to work properly just by retying and making sure the mouse is over the client window at all times. For some reason this client hates to lose focus during this phase.
Every now and then though it just completely refuses to load one of my characters while working fine for others. This is what leads me to think there is something wrong with the character data. I suspect it to be related to either skills or quests although I am still having trouble pinning down precisely what the error is because it happens so rarely and is very hard to reproduce reliably to test anything.

Things to try.
1 just retry the same character and make sure the mouse is over the client window at all times. Even move it around a bit.
2 Try a new character
3 delete all skill and quest data from the database for the specific character and then try it again
4 Make sure that the start town in the characters table isn't some stupid value like 54 ( I keep finding that happening to one of mine. Resetting it to 1 sometimes fixes the loading error for that character )
5 Open up ClientLog.log in the log folder of the client in a decent text editor such as notepad++ and see what the last few lines say. This will tell us exactly where the error occurred. (hopefully). If you have no "log" folder in your client, make one. It will only create the log if the folder exists
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: client crash after entering worldserver

Postby wouter2004 on Fri Jan 19, 2018 4:25 pm

Thanks for your quick advise and suggested solutions. Unfortunately I have no luck yet. I trucated all the character tables and created a new account and a new character. I also kept the focus on the game window, but still it crashes when I try to enter the World server.

I checked the client.log and the last line is about the quest assignment, so perhaps this is where it goes wrong. Do you have any idea's?

Cheers, Wouter
Attachments
Capture.PNG
wouter2004
Little soul
Little soul
 
Posts: 6
Joined: Wed Jan 17, 2018 11:33 am

Re: client crash after entering worldserver

Postby PurpleYouko on Fri Jan 19, 2018 9:32 pm

yeah I'm not surprised it turned out to be there. That part of the code has given me more problems than all the rest combined.
I used to have a debug message in that code that would have helped diagnose it further but I took it out after i thought it was fixed.

Here is the code for the function that is most likely crashing. (not that it will help much)
  1. void CRecvPACKET::Recv_gsv_QUEST_DATA()     //0x071b
  2. {
  3.     ClientLog(LOG_DEBUG,"Receive quest data packet received");  //this packet also includes the wishlist
  4.     CGame& refGame = CGame::GetInstance();
  5.  
  6.     memcpy( &refGame.m_QuestData, &m_pRecvPacket->m_gsv_QUEST_DATA, sizeof( m_pRecvPacket->m_gsv_QUEST_DATA ) );
  7.  
  8.     //ClientLog(LOG_DEBUG,"first item of wishlist. Type: %i number: %i",m_pRecvPacket->m_gsv_QUEST_DATA.m_WishLIST.m_WishITEM[0].m_cType, m_pRecvPacket->m_gsv_QUEST_DATA.m_WishLIST.m_WishITEM[0].m_nItemNo);
  9.  
  10.     g_EUILobby.CloseAvataListDlg(); 
  11.  
  12.     CGame::GetInstance().CreateSelectedAvata();
  13.  
  14.  
  15.     gsv_TELEPORT_REPLY data;
  16.     data.m_nZoneNO = refGame.m_SelectedAvataInfo.m_nZoneNO;
  17.     data.m_PosWARP.x = refGame.m_SelectedAvataInfo.m_PosSTART.x;
  18.     data.m_PosWARP.y = refGame.m_SelectedAvataInfo.m_PosSTART.y;
  19.  
  20.  
  21.     refGame.SetLoadingData(  data );
  22.     //ClientLog(LOG_DEBUG,"Running GS_MOVE_MAIN.");
  23.     refGame.ChangeState( CGame::GS_MOVEMAIN );
  24.  
  25. }


What is the build date on trose.exe in your client? I'm looking in the "wibble wibble" repo master on my computer and it looks like the ones in the bin folders are really old. 2014 or something equally ancient.
In the root folder there is one that was built in september 2016. make sure you are using that one.

I haven't worked on this source in a while since nobody seemed to give a crap about it. It seems that lately there are a few people interested in it again so it may be worth my while to rebuild everything again and try to figure out a few of these bugs :D

That 0x071b packet is a frickin pain in the ass though.

the basic structure seems ok. It goes like this
  1. 0x071b  Initial Quest data uploaded to client. Also includes wishlist for player shops. (seems like a weird place to put that)                                                 
  2.     void CRecvPACKET::Recv_gsv_QUEST_DATA()                                                
  3.     struct gsv_QUEST_DATA : public t_PACKETHEADER                                                  
  4.     {                                                  
  5.         tagQuestData    m_Quests;                       See Sub_Structures page for more information on these structures                   
  6.         tagWishLIST     m_WishLIST;                 See Sub_Structures page for more information on these structures                   
  7.     } ;                                                
  8.  


Doesn't look so bad does it?
How about when we actually look at the structure of tagQuestData?
  1.  
  2. tagQuestData                                           
  3.     struct tagQuestData                                    
  4.     {                                      
  5.         short   m_nEpisodeVAR[ QUEST_EPISODE_VAR_CNT ];                            
  6.         short   m_nJobVAR  [ QUEST_JOB_VAR_CNT];                               
  7.         short   m_nPlanetVAR [ QUEST_PLANET_VAR_CNT ];                             
  8.         short   m_nUnionVAR  [ QUEST_UNION_VAR_CNT ];                              
  9.         CQUEST  m_QUEST  [ QUEST_PER_PLAYER ];                         
  10.         WORD        m_wID;                         
  11.         DWORD       m_dwExpirationTIME;                        
  12.         t_qstvar    m_pVAR[ QUEST_VAR_PER_QUEST ]; (0-9)                                   
  13.     Union   BYTE    m_btSWITCHES[ QUEST_SWITCH_PER_QUEST/8 ]; (0 - 3)                              
  14.         DWORD   m_dwSWITCHES;                              
  15.         tagBaseITEM     m_ITEMs[ QUEST_ITEM_PER_QUEST ]; (0 - 5)                           
  16.     Union   DWORD   m_dwSWITCHES [ QUEST_SWITCH_CNT/32 ];                           array of 16 groups of flags. Used for deleting or setting entire groups (QSD)   
  17.         BYTE    m_btSWITCHES [ QUEST_SWITCH_CNT/8 ];                            array of 64 bytes containing 512 bit-switches   
  18.         short   m_nClanWarVAR [QUEST_CLANWAR_VAR_CNT ];                            
  19.     };                                     
  20.  


and here is tagWishList
  1. tagWishLIST                    
  2.     #define MAX_WISH_ITEMS      30     
  3.     struct tagWishLIST                 
  4.     {                  
  5.         tagITEM m_WishITEM[ MAX_WISH_ITEMS ];          
  6.     } ;                
  7.  

which of course contains tagITEM :roll:
  1. #define tagITEM     tagBaseITEM         Just to keep things fun they decided to cast tagITEM as tagBaseITEM. Yeesh….                 
  2.  

Which as it turns out is actually cast as another structure, tagBaseITEM. Oh hell yeah.... It's like jumping down Alice's rabbit hole
So here is tagBaseITEM
  1. tagBaseITEM                            
  2.     struct tagBaseITEM                         
  3.     {                          
  4.         byte    m_cType;                   
  5.         short   m_nItemNo;                 
  6.         byte    m_bCreated;                
  7.         short   m_nGEM_OP;                 
  8.         byte    m_cDurability;                 
  9.         short   m_nLife;                   
  10.         byte    m_bHasSocket;                  
  11.         byte    m_bIsAppraisal;                
  12.         byte    m_cGrade;                  
  13.         struct  //PY added new stats structures                
  14.         {                      
  15.             short m_UStat1;                
  16.             short m_UStat2;                
  17.             short m_UValue1;                   
  18.             short m_UValue2;                   
  19.         };                     
  20.         struct  // Timer related stuff. Typically send zeroes for this                 
  21.         {                      
  22.             DWORD dwPickOutTime;                   
  23.             WORD  wPeriod;                 
  24.         };                     
  25.     }                          
  26.  

I kind of modified the hell out of that structure at an earlier stage in order to make some new functionality in the client so that makes it even more complicated. lol
It also used to be full of bit fields which i removed completely at the expense of making the packet slightly bigger. Way easier to work with now though

So anyhow, This is what I have to filter through to figure out what is wrong with that damn packet. lol

Almost forgot to add, the packet contains an array of 30 tagITEM objects :o they are sent sequentially making it a rather large packet. Just as well it only gets used once during initial login.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: client crash after entering worldserver

Postby wouter2004 on Fri Jan 19, 2018 11:56 pm

Okay thanks, well tomorrow I have some more time on my hands. I can install Visual Studio on my private laptop and use the debugger to set some breakpoints. I hope that works out.
I also notice that VS 2017 on Windows 10 did not have all the correct SDK 8 libraries in place to compile the TRose without errors. Can you tell me which version of VS you use and which SDK for the libraries?

You already helper a lot, with your help I am sure I will eventually get it to work. :)
wouter2004
Little soul
Little soul
 
Posts: 6
Joined: Wed Jan 17, 2018 11:33 am

Re: client crash after entering worldserver

Postby lazypenguin on Sat Jan 20, 2018 12:58 am

I believe the project depends on Visual studio 2010. I had started re-factoring the project to use VS2017 and to statically link triggervfs, znzin, etc. but never completely finished linking in all the external libraries. It wasn't too much work, just some deprecating functions had to be fixed.
lazypenguin
Pomic
Pomic
 
Posts: 78
Joined: Mon Aug 10, 2009 6:51 am

Re: client crash after entering worldserver

Postby wouter2004 on Sun Jan 21, 2018 9:38 pm

Based on your feedback regarding the QuestTag structures and a part of the Wishlist which is loaded when entering the Worldserver, I have removed all the MySQL tables and ran the database scripts again.
These are the database scripts which are located in the Database map of the Server software on Github.

Unfortunately the Wishlist table is incomplete and misses the itemhead column. In the attached screenshot you will see the error in the console of the WorldServer.

The last time I had manually created the itemhead column based on the REV81 version of osRose, which also contains the sql files for creating the wishlist table. However maybe I haven't used the correct variable for the column itemhead and this is the reason why my client dumped last Friday.

Is this a possibility? Because furthermore I have done everything exactly as described in the quick guide.
Attachments
Capture.PNG
wouter2004
Little soul
Little soul
 
Posts: 6
Joined: Wed Jan 17, 2018 11:33 am

Re: client crash after entering worldserver

Postby PurpleYouko on Mon Jan 22, 2018 3:45 pm

most of that output is related to QSD handling in the worldserver. It's the QSD file that runs when a character joins the world. It sets your map position and stuff.

there is no column by the name of itemHead in the wishlist table of project 137. My wishlist table has been completely revamped and bears no resemblance to the older versions that had itemhead as an int(11) or whatever they were. We now have all the components of itemhead as individual values.
the error you are seeing is because your table has such a field when it shouldn't.
Did you run the all in one database installer? if so then that's your problem. That is old legacy crap that needs to be deleted. Most of the tables in that thing are directly from the old rev 81 database which has long since been altered beyond recognition, especially in any of my projects which have largely inherited from my KTRose pre-evo base.

Don't ever try to "fix" stuff by using values from rev 81. The central structure of project 137 is very very different to that of rev 81. I completely rewrote everything related to item types to remove all the weird shit it was doing with bit shifted values in bitfields. This change was made at both client and server. The basic item stuctures throughout the entire game now work in a completely different way

Unfortunately the only way to really build the database is to run all the sql files into it one by one. I never built a working macro for it since every time i tried, I always ran up against a limit in the number of queries that could be queued in my database manager. Basically it wouldn't allow me to do it in one go so i thought 'bugger it' and just left them as individual sql files.

here is the sql for the wishlist table
  1. -- phpMyAdmin SQL Dump
  2. -- version 2.10.3
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Jan 22, 2018 at 08:26 AM
  7. -- Server version: 5.0.45
  8. -- PHP Version: 5.2.3
  9.  
  10. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  11.  
  12. --
  13. -- Database: `osrose`
  14. --
  15.  
  16. -- --------------------------------------------------------
  17.  
  18. --
  19. -- Table structure for table `wishlist`
  20. --
  21.  
  22. DROP TABLE IF EXISTS `wishlist`;
  23. CREATE TABLE IF NOT EXISTS `wishlist` (
  24.   `owner` int(11) NOT NULL,
  25.   `itemid` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  26.   `itemtype` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  27.   `refine` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  28.   `durability` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  29.   `lifespan` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  30.   `slot` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  31.   `count` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  32.   `stats` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  33.   `socketed` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  34.   `appraised` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  35.   `ustat1` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  36.   `ustat2` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  37.   `uvalue1` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  38.   `uvalue2` varchar(1024) collate latin1_general_ci NOT NULL default '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0',
  39.   `trans_action` varchar(200) collate latin1_general_ci default '0'
  40. ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
  41.  
  42. --
  43. -- Dumping data for table `wishlist`
  44. --


here is the top of the function that actually loads in the wishlist and that is generating that error.
  1. //Loading Wishlist.
  2. bool CWorldServer::GetWishlist( CPlayer* thisclient)
  3. {
  4.     MYSQL_ROW row;
  5.     MYSQL_RES *result = GServer->DB->QStore("SELECT itemid,itemtype,refine,durability,lifespan,count,stats,socketed,appraised,ustat1,ustat2,uvalue1,uvalue2,trans_action FROM wishlist WHERE owner=%i ORDER BY slot DESC", thisclient->CharInfo->charid);
  6.     if(result == NULL)
  7.     {
  8.         GServer->DB->QFree( );
  9.         Log(MSG_WARNING, "Something a bit wrong with this query");
  10.         return false;
  11.     }
  12.     const char *tmpid;
  13.     char *itmp = 0;
  14.     int itemid;
  15.     while( row = mysql_fetch_row(result) )
  16.     {
  17.         tmpid = strtok( row[0] , "|");
  18.         for(unsigned int i=1;i<=MAX_WISHLIST; i++)
  19.         {
  20.             if((itmp = strtok( NULL , "|"))!= NULL)
  21.                 thisclient->wishlistitems[i].itemnum = GServer->GetSafeAtoi(itmp);
  22.         }
  23.         tmpid = strtok( row[1] , "|");
  24.         for(unsigned int i=1;i<=MAX_WISHLIST; i++)
  25.         {
  26.             if((itmp = strtok( NULL , "|"))!= NULL)
  27.                 thisclient->wishlistitems[i].itemtype = GServer->GetSafeAtoi(itmp);
  28.         }


As you can see, all my fields are tokenized lists now. This means that there is only ONE entry per character rather than up to 250 different individual entries in the old system.
You will find similar changes in all the places where item data are stored. Inventory, storage and a few others if i remember correctly. It's been a while. I did most of the basic work on that stuff in KTRose pre-evo back in about 2010
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm


Return to BUGS

Who is online

Users browsing this forum: No registered users and 3 guests

cron