[solved]Field server build

Results 1 to 14 of 14
  1. #1
    Guss decarvk is offline
    MemberRank
    Jul 2008 Join Date
    /home/bed/Location
    381Posts

    [solved]Field server build

    Hi every one, I have work on partial source code to get working all build but I have a last error remaining on field server build.

    I come here to ask if someone know a way to fix this error:

    Code:
    Compiling...
    FieldIOCPSocket2.cpp
    C:\prog\SourceCode\GameServer\FieldServer\Main\FieldIOCPSocket2.cpp(40521) : warning C4305: 'initializing' : truncation from 'int' to 'short'
    C:\prog\SourceCode\GameServer\FieldServer\Main\FieldIOCPSocket2.cpp(40521) : warning C4309: 'initializing' : truncation of constant value
    f:\microsoft visual studio\vc98\include\xmemory(34) : error C2660: 'new' : function does not take 2 parameters
            f:\microsoft visual studio\vc98\include\xmemory(66) : see reference to function template instantiation 'void __cdecl std::_Construct(struct ActionInfo *,const struct ActionInfo &)' being compiled
    Error executing cl.exe.
    
    FieldServer.exe - 1 error(s), 2 warning(s)
    it's the first time I see this kind of error, after some search it's appear to be in relation with overload of operator new and use of stl container, but after some search I don't find the source of this issue.

    if someone have an idea of the way to follow th patch this error I will be happy to read him.


  2. #2
    [solved]Field server build St34lth4ng3l is offline
    MemberRank
    Apr 2013 Join Date
    __FILE__Location
    899Posts

    Re: Field server build

    truncation from 'int' to 'short'

    int != short

  3. #3
    Guss decarvk is offline
    MemberRank
    Jul 2008 Join Date
    /home/bed/Location
    381Posts

    Re: Field server build

    I know for these warning but it's not from these one last compile log:

    Code:
    ...
    FieldIOCPSocket.cpp
    FieldIOCPSocket2.cpp
    F:\Microsoft Visual Studio\VC98\INCLUDE\xmemory(34) : error C2660: 'new' : function does not take 2 parameters
            F:\Microsoft Visual Studio\VC98\INCLUDE\xmemory(66) : see reference to function template instantiation 'void __cdecl std::_Construct(struct ActionInfo *,const struct ActionInfo &)' being compiled
    FieldItemManager.cpp
    ...

  4. #4
    sapadia.net geger009 is offline
    DeveloperRank
    Mar 2011 Join Date
    IndonesiaLocation
    1,008Posts

    Re: Field server build

    maybe someting wrong with

    struct* pointer = new struct;

    i found solution for that..

    Solution

  5. #5
    [solved]Field server build St34lth4ng3l is offline
    MemberRank
    Apr 2013 Join Date
    __FILE__Location
    899Posts

    Re: Field server build

    function does not take 2 parameters

    try something like this: example_func(param1, param2);to: example_func(param1);

  6. #6
    Retired (Goddamn idiots) DragonLord is offline
    MemberRank
    Dec 2003 Join Date
    /dev/urandomLocation
    554Posts

    Re: Field server build

    It's an issue with their implementation.
    Create an overload for the new() operator in that class or struct.

  7. #7
    Guss decarvk is offline
    MemberRank
    Jul 2008 Join Date
    /home/bed/Location
    381Posts

    Re: Field server build

    Quote Originally Posted by DragonLord View Post
    It's an issue with their implementation.
    Create an overload for the new() operator in that class or struct.
    made an overload of new operator for CFieldIOCPSocket?

    @St34lth4ng3l I think it's a problem of some missing overload function/operator for an object copy or initialization.

    solved by adding a new overload in monster.h for struct ActionInfo.
    Last edited by decarvk; 22-10-13 at 11:10 PM.

  8. #8
    Proficient Member ttlove9 is offline
    MemberRank
    Dec 2012 Join Date
    Hải Dương (Location
    162Posts

    Re: Field server build

    Quote Originally Posted by decarvk View Post
    made an overload of new operator for CFieldIOCPSocket?

    @St34lth4ng3l I think it's a problem of some missing overload function/operator for an object copy or initialization.

    solved by adding a new overload in monster.h for struct ActionInfo.
    Same problem, thankyou very much
    void * operator new(size_t size, void *p)
    {
    return CVMemPool::vmObjectNew(size);
    }

  9. #9
    Member empilein is offline
    MemberRank
    Nov 2010 Join Date
    59Posts

    Re: [solved]Field server build

    than you do soemthing wrong it works >:)

  10. #10
    Member vietnamese is offline
    MemberRank
    Jun 2011 Join Date
    80Posts

    Re: Field server build

    Quote Originally Posted by ttlove9 View Post
    Same problem, thankyou very much
    Thank... And another problem.
    Attached Thumbnails Attached Thumbnails my-problem.png  

  11. #11
    struct { int:-!!(1); } Aesir is offline
    MemberRank
    May 2015 Join Date
    MadnessLocation
    279Posts

    Re: Field server build

    Maybe you not solved correctly the first one.

  12. #12
    Member burgers is offline
    MemberRank
    Jul 2013 Join Date
    61Posts

    Re: [solved]Field server build

    Post what you've done and we can see if it's correct or not. Simple.

  13. #13
    Member vietnamese is offline
    MemberRank
    Jun 2011 Join Date
    80Posts

    Re: [solved]Field server build

    I fixed it.. Thank everyone so much..!!

  14. #14
    Member burgers is offline
    MemberRank
    Jul 2013 Join Date
    61Posts

    Re: [solved]Field server build

    Helps to say whether it is was using this fix or not seeing as you didn't fix it initially.



Advertisement