Jump to content

Hero

Banned
  • Posts

    5
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Hero

  1. 16 hours ago, Mind Rapist said:

    Hey guys :) I have this problem:

      Hide contents

    char_item.cpp:4752: error: 'to_string' is not a member of 'std'
    char_item.cpp:4758: error: 'to_string' is not a member of 'std'
    char_item.cpp:4764: error: 'to_string' is not a member of 'std'

    Function:

      Hide contents

    case USE_UNBIND:
                                    {
                                        if (!item2->IsBindedTo())
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This item is not binded!"));
                                            return false;
                                        }

                                        if (item2->GetBindingLeft() != 1)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your item is still unbinding..."));
                                            return false;
                                        }

                                        item2->SetBinding(false, item->GetValue(0));

                                        unsigned int hours = item->GetValue(0) / 3600;
                                        unsigned int minutes = (item->GetValue(0) - hours * 3600) / 60;
                                        unsigned int seconds = item->GetValue(0) - hours * 3600 - minutes*60;

                                        std::string rTime = LC_TEXT("Your item will be unbinded in ");
                                        if (hours > 0)
                                            rTime += std::to_string(hours) + "h";

                                        if (minutes > 0 && hours > 0)
                                            rTime += " ";

                                        if (minutes > 0)
                                            rTime += std::to_string(minutes) + "m";

                                        if (minutes > 0 && (hours > 0 || minutes > 0))
                                            rTime += " ";

                                        if (seconds > 0)
                                            rTime += std::to_string(seconds) + "s";

                                        ChatPacket(CHAT_TYPE_INFO, rTime.c_str());

                                        item->SetCount(item->GetCount() - 1);
                                        break;
                                    }
     

    Red lines are the problem

    Thanks in advance :)

    Removed.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.