Jump to content
  • 0
Sign in to follow this  

Question

Hello people! As we all know this is the main function

 

 

main = function()
    for ItemID,DESC in pairs(tbl) do
        result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, 
 
DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
        if not result then
            return false, msg
        end
        for k,v in pairs(DESC.unidentifiedDescriptionName) do
            result, msg = AddItemUnidentifiedDesc(ItemID, v)
            if not result then
                return false, msg
            end
        end
        for k,v in pairs(DESC.identifiedDescriptionName) do
            result, msg = AddItemIdentifiedDesc(ItemID, v)
            if not result then
                return false, msg
            end
        end
    end
    return true, "good"
 end

 

Now, My server doesnt 'drop' unidentified items, so there is no means for the unidentifiedDisplayName, unidentifiedResourceName, unidentifiedDescriptionName, variable.

 

Now the question is, What should be the 'code' be for the main_function? is this even possible?

 

Why am I doing this? To save space + for easier addition/editing of items!

 

Thanks in advance for the help! Hercules truly has a great community!

 

-Anjo

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

he wants to remove the unidentified part of iteminfo file, in client side!

 

@topic

try this one:

main = function()    for ItemID,DESC in pairs(tbl) do        result, msg = AddItem(ItemID, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)        if not result then            return false, msg        end        for k,v in pairs(DESC.identifiedDescriptionName) do            result, msg = AddItemIdentifiedDesc(ItemID, v)            if not result then                return false, msg            end        end    end    return true, "good" end

Share this post


Link to post
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
Answer this question...

×   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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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