Register for your free account! | Forgot your password?

You last visited: Today at 05:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



getting item name crash

Discussion on getting item name crash within the SRO Coding Corner forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,024
getting item name crash

i was trying to make item linking , everything was going fine till that part

Code:
 CItemData* itemdata = g_CGlobalDataManager->m_itemDataMap[CurSlot->ItemInfo->ItemID];
 std::wstring ItemName = g_CTextStringManager->GetStringByNameStrID(&itemdata->m_nameStrId128)->c_str();
another fail try
Code:
 const wchar_t* ItemName = g_CTextStringManager->GetString(g_CGlobalDataManager->m_itemDataMap[CurSlot->ItemInfo->ItemID]->m_nameStrId128.c_str())->c_str();
bimbum* is offline  
Old 07/08/2021, 11:04   #2


 
SubZero**'s Avatar
 
elite*gold: 270
Join Date: Apr 2017
Posts: 1,035
Received Thanks: 530
Code:
ObjectData* CGlobalDataManager::GetObjectData(unsigned int ObjID)
{
    return reinterpret_cast<ObjectData * (__thiscall*)(CGlobalDataManager*, unsigned int)>(0x0093F710)(this, ObjID);
}
SubZero** is offline  
Old 07/08/2021, 11:20   #3
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,024
Quote:
Originally Posted by SubZero** View Post
Code:
ObjectData* CGlobalDataManager::GetObjectData(unsigned int ObjID)
{
    return reinterpret_cast<ObjectData * (__thiscall*)(CGlobalDataManager*, unsigned int)>(0x0093F710)(this, ObjID);
}
i fixed it but its still fishy since i just changed randomly variables types
bimbum* is offline  
Old 07/09/2021, 16:16   #4
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,024
another issue
since c++ treat backslash as an escape. i gave up getting the associated icon from the client side , so i moved on and tried to get it from the server side.
i sent the server the itemid then the server responded with associated icon at this format
Code:
item\\\\xx\\\\***.ddj
now c++ will read it as
Code:
item\\xx\\xx.ddj
Code:
 std::n_string iconassc;
        *msg >> iconassc;
        CIFMainMenu::GlobalLinkGUI->m_custom_label10->TB_Func_13(iconassc.c_str(),0,0);
        msg->FlushRemaining();
i believe its variables types issue too

edit**: thanks to vero it was a variable type issue
(objectdata -> associtemicon has to be std::string)
bimbum* is offline  
Thanks
2 Users
Old 07/09/2021, 19:31   #5
 
elite*gold: 0
Join Date: Apr 2012
Posts: 266
Received Thanks: 272
Quote:
Originally Posted by bimbum* View Post
another issue
since c++ treat backslash as an escape. i gave up getting the associated icon from the client side , so i moved on and tried to get it from the server side.
i sent the server the itemid then the server responded with associated icon at this format
Code:
item\\\\xx\\\\xxx.ddj
now c++ will read it as
Code:
item\\xx\\xx.ddj
Code:
 std::n_string iconassc;
        *msg >> iconassc;
        CIFMainMenu::GlobalLinkGUI->m_custom_label10->TB_Func_13(iconassc.c_str(),0,0);
        msg->FlushRemaining();
i believe its variables types issue too

edit**: thanks to vero it was a variable type issue
(objectdata -> associtemicon has to be std::string)
in the original it was cifslotwithhelp . not cifstatic
thaidu0ngpr0 is offline  
Thanks
1 User
Old 07/09/2021, 20:03   #6
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,024
Quote:
Originally Posted by thaidu0ngpr0 View Post
in the original it was cifslotwithhelp . not cifstatic
who cares
bimbum* is offline  
Closed Thread


Similar Threads Similar Threads
Crash, crash, and more crash trying to log in
07/28/2010 - SRO Private Server - 3 Replies
When i try to log in i always put something heavy pressing the enter key but i get a crash after 10-15 min of trying to log in
Crash Crash Crash
07/27/2010 - SRO Private Server - 3 Replies
When i try to log in with bot, after i log in, instant CRASH. It is because of the traffic on ZSZC ? What should i do ?
Crash. Crash. Crash. Help?
10/30/2009 - Dekaron - 10 Replies
Okay EPVPr's, I have a question for you. Is anyone else having the 2moons/dekaron client crash on them as much as it is for me? I'll explain my full situation unlike alot of people on here(I'm sure most of you guy's know what i'm referring to :p) Situation: I start 2Moons, login. Usually on char select i'll open CE 5.5 from my "Up To Date" .CT file. Other times it will be "in map" depends on the situation as you all know. With as little as only one script activated(or even all) which most...



All times are GMT +2. The time now is 05:40.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.