EC: textparsing.lua, 2 issues.

ForeverFunForeverFun Posts: 900
textparsing.lua,function TextParsing.SpecialTexts()

Noticed this while adding content at this link.

Charybdis map waypoint may not add correctly, as the code is operating on mixed unicode/non-unicode, and the waypoint add code is likely never reached.  I don't have a way to directly confirm.

    -- CHARYBDIS
    if ( SystemData.TextID ==  1150191) then -- "The location you seek is:"
        clean =  wstring.gsub(GetStringFromTid(1150191),L" ~1_val~", L"")  -- The location you seek is: ~1_val~
--        local coord = wstring.gsub(senderText, clean, "")
--        coord = StringToWString(coord)                        -- likely faults, rest of code here may not execute.
        local coord = wstring.gsub(senderText, clean, L"")    -- new code uses L""

Same problem below, the comma adding code will never be reached, as the mixed unicode/non unicode handling.

On the other hand, you can completely delete this case, as adding commas to the string after the text is already displayed doesn't do anything :)


    if ( SystemData.TextID == 1151281) then -- "Your Clean Up Britannia point total is now ~1_VALUE~!"
        local clean =  wstring.gsub(GetStringFromTid(1151281),L"~1_VALUE~!", L"")
--        local num = wstring.gsub(senderText, clean, "")
--        local num = wstring.gsub(num, "!", "")
        local num = wstring.gsub(senderText, clean, L"")
        local num = wstring.gsub(num, L"!", L"")            -- note, cannot pass "!", must be unicode L"!"


Sign In or Register to comment.