PDA

View Full Version : Worms CopyFolder function


scotland42
04-08-2005, 05:18 PM
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
04-08-2005, 06:22 PM
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 ]