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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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