Jump to content

MapExtractor compilation error


Hyper

Recommended Posts

Error in line 125 (loadlib.cpp):
  FileChunk* chunk = new FileChunk{ ptr, size };

 

  
 
 
Function:
 

void ChunkedFile::parseChunks()
{
    uint8* ptr = GetData();
    while (ptr < GetData() + GetDataSize())
    {
        u_map_fcc header = *(u_map_fcc*)ptr;
        uint32 size = 0;
        if (IsInterestingChunk(header))
        {
            size = *(uint32*)(ptr + 4);
            if (size <= data_size)
            {
                std::swap(header.fcc_txt[0], header.fcc_txt[3]);
                std::swap(header.fcc_txt[1], header.fcc_txt[2]);

                FileChunk* chunk = new FileChunk{ ptr, size };
                chunk->parseSubChunks();
                chunks.insert({ std::string(header.fcc_txt, 4), chunk });
            }
        }

        // move to next chunk
        ptr += size + 8;
    }
}

 


Output errors:
 

1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(125): error C2143: syntax error : missing ';' before '{'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(125): error C2143: syntax error : missing ';' before '}'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(127): error C2143: syntax error : missing ')' before '{'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(127): error C2661: 'std::multimap<_Kty,_Ty>::insert' : no overloaded function takes 0 arguments
1>          with
1>          [
1>              _Kty=std::string,
1>              _Ty=FileChunk *
1>          ]
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(127): error C2143: syntax error : missing ';' before '{'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(127): error C2143: syntax error : missing ';' before '}'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(127): error C2059: syntax error : ')'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(168): error C2143: syntax error : missing ';' before '{'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(168): error C2143: syntax error : missing ';' before '}'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(170): error C2143: syntax error : missing ')' before '{'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(170): error C2661: 'std::multimap<_Kty,_Ty>::insert' : no overloaded function takes 0 arguments
1>          with
1>          [
1>              _Kty=std::string,
1>              _Ty=FileChunk *
1>          ]
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(170): error C2143: syntax error : missing ';' before '{'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(170): error C2143: syntax error : missing ';' before '}'
1>C:\SkyFireWow\SkyFire_5xx\src\tools\map_extractor\loadlib.cpp(170): error C2059: syntax error : '

 

how can i fix it?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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