Thread: Copylevel
View Single Post
  #1  
Old 04-17-2007, 08:53 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Copylevel

Doesn't seem to work... the folder exists, with a file already in the folder.

Here's the code: (Database)


HTML Code:
public function copyLevel(origionalName, newName)
{
  temp.levelChecks = {{temp.origionalName, ""}, {temp.newName, true}};
  for (temp.currentLevel: temp.levelChecks)
  {
    if (findlevel(temp.currentLevel[0]) == temp.currentLevel[1])
    {
      temp.alreadyExists = true;
      break;
    }
  }
  if (temp.alreadyExists)
  {
    return false;
  }
  temp.filePath = "levels/world/sanddungeon/";
  copylevel(temp.filePath @ temp.origionalName, temp.filePath @ temp.newName);
  
  echo("CREATED NEW LEVEL!");
}
function onCreated()
{
  this.copyLevel("v_cavelevel.nw", "v_cavelevels.nw");
}
The error that it produces: (via NC)

HTML Code:
The script of NPC Control_LevelGenerator has been updated by Chandler
GraalScript: Loop limit exceeded at line 4 in script of Control_LevelGenerator
Anyone know of why?

Here's the FTP
Attached Thumbnails
Click image for larger version

Name:	fileShow.png
Views:	131
Size:	11.0 KB
ID:	40635  
Reply With Quote