[BNW] LUA Popup Question: Is it an error or is it not?

sman1975

Emperor
Joined
Aug 27, 2016
Messages
1,376
Location
Dallas, TX
Hello,

Working on a simple popup window, and at some time in the past 10-15 changes/rebuilds, an odd message showed up in the database.log - I"m not sure when it started exactly, and the code actually works fine:
Code:
[425562.593] Database::XMLSerializer (LUA/MercFunctions/MercFunctionPopup.xml): 'Row' or 'Delete' expected, got 'Image'.


Here is the full contents of the MercFunctionPopup.xml file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<Context ID="MercFunPopup">
    <Box Style="BGBlock_ClearTopBar" />

    <Grid Size="640,340" Anchor="C,C" Style="Grid9DetailFive140" ConsumeMouse="1">
        <Image Anchor="C,T" AnchorSide="I,O" Offset="0,-27" Size="256,64" Texture="DecTop256x64.dds">
            <Image Anchor="C,C" Offset="0,-6" Size="80,80" Texture="NotificationFrameBase.dds">
                <Image ID="DialogTopIcon" Anchor="C,C" Offset="0,0" Size="80,80" Texture="NotificationGeneric.dds" />
            </Image>
        </Image>

        <Image Anchor="L,C" AnchorSide="O,I" Offset="-17,0" Size="32,64" Texture="Dec32x64Left.dds" />
        <Image Anchor="R,C" AnchorSide="O,I" Offset="-17,0" Size="32,64" Texture="Dec32x64Right.dds" />
        
        <AlphaAnim ID="BgImage" Anchor="L,T" Offset="17,43" Size="606,260" TextureOffset="0,0" Texture="MercBG.dds" Cycle="Once" Stopped="1" AlphaStart="0.3" AlphaEnd="0.1" Speed="1"/>
        
        <Label ID="Message1" Anchor="C,T" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" String="TXT_KEY_MERC_FUN_MESSAGE_1" Offset="0, 20"/>
        <Label ID="Message2" Anchor="L,T" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" String="TXT_KEY_MERC_FUN_MESSAGE_2" Offset="35, 70"/>
        <Label ID="Message3" Anchor="L,T" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" String="TXT_KEY_MERC_FUN_MESSAGE_3" Offset="35, 110"/>
        <Label ID="Message4" Anchor="L,T" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" String="TXT_KEY_MERC_FUN_MESSAGE_4" Offset="35, 150"/>
        <Label ID="Message5" Anchor="C,T" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" String="TXT_KEY_MERC_FUN_MESSAGE_5" Offset="0, 200"/>
                
        <Stack Anchor="C,B" Offset="0,60" StackGrowth="Right" Padding="10">
            <GridButton ID="Rehire" Size="140,36" Style="BaseButton" ToolTip="TXT_KEY_MERC_FUN_REHIRE_BUTTON_TT">
                <Label Anchor="C,C" Offset="0,-2" String="TXT_KEY_MERC_FUN_REHIRE_BUTTON" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" />
            </GridButton>

            <GridButton ID="Disband" Size="140,36" Style="BaseButton" ToolTip="TXT_KEY_MERC_FUN_DISBAND_BUTTON_TT">
                <Label Anchor="C,C" Offset="0,-2" String="TXT_KEY_MERC_FUN_DISBAND_BUTTON" Font="TwCenMT24" FontStyle="Shadow" ColorSet="Beige_Black_Alpha" />
            </GridButton>
        </Stack>
    </Grid>
</Context>

I'm not sure where a Row or Delete would be expected here. Does anyone have a clue what I'm doing wrong here?

I know, it's working so no problem, eh? Just hate having these kind of errors in the log in case it comes up to bite me later... Thanks!
 
Sounds like you're trying to load an "interface" XML file via the Actions Tab (where you'd normally load "database" XML files).

Given that you've got it to work, it was probably unintentional and you know this already, but just in case, new Interface files are loaded via the Content-Tab and "Import to VFS" = true, or just by setting "Import to VFS" = true if you're overriding a file from the game itself. The Actions Tab is not for "interface" XML files.
 
@Valessa - Bingo! You are 100% correct. I had *somehow* set up the .xml file as an OnModLoad/UpdateDatabase instead of the "Import to VFS=true" setting. Switched it back and miraculously, the error went away... :hammer2:

No matter how many times I look at these things when I'm building them, even if I have a great examples to plaiger...., er, borrow... I still seem to find a way to make a rookie mistake. Can't blame the computer - it did EXACTLY what I told it to do... :crazyeye:

Really appreciate the quick, solid information! Y'all are the greatest!
 
Back
Top Bottom