Worms CopyFolder function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • scotland42
    Forum Member
    • Jan 2005
    • 26

    Worms CopyFolder function

    I just ran into something with Worms CopyFolder function.

    I was trying to copy a folder of stuff from a CD to the harddrive. For whatever reason, I kept getting an error that I couldn't figure out.

    After playing around for a while, I discovered this fix which seems to work REALLY well. I'm not sure if there is a downside to doing this, but here goes.

    The original few lines of code are as follows:
    <code>
    function CopyFolder(sSource, sDestination)
    local m_sFolder;
    local m_FoundFolder;
    local error;
    </code>

    Here is what I did:
    <code>
    function CopyFolder(sSource, sDestination)
    local m_sFolder;
    local m_FoundFolder;
    local error = 0;
    </code>

    Now whenever I try, everything works perfectly. I am assuming that there will be no errors. If an error does occur, the folder still won't copy, so no harm done (I think)
  • Intrigued
    Indigo Rose Customer
    • Dec 2003
    • 6125

    #2
    Originally posted by scotland42
    I just ran into something with Worms CopyFolder function.

    I was trying to copy a folder of stuff from a CD to the harddrive. For whatever reason, I kept getting an error that I couldn't figure out.

    After playing around for a while, I discovered this fix which seems to work REALLY well. I'm not sure if there is a downside to doing this, but here goes.

    The original few lines of code are as follows:
    <code>
    function CopyFolder(sSource, sDestination)
    local m_sFolder;
    local m_FoundFolder;
    local error;
    </code>

    Here is what I did:
    <code>
    function CopyFolder(sSource, sDestination)
    local m_sFolder;
    local m_FoundFolder;
    local error = 0;
    </code>

    Now whenever I try, everything works perfectly. I am assuming that there will be no errors. If an error does occur, the folder still won't copy, so no harm done (I think)
    Thanks for sharing!

    By the way, your BBcode will work here... just change out the < for [ and > for ]
    Intrigued

    Comment

    Working...
    X