Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-05-2009, 05:16 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
How-To: copylevel()

I ran into some problems using copylevel() yesterday and had to look at resources from different threads to figure out my problem entirely so I decided to put all my findings into one thread in hopes that it makes it easier for others to understand how to use this command.


Important Notes

. copylevel() is used to create an exact duplicate of a level that will be saved into a different directory from that of the level being copied (the copied level does NOT have to have the same name as the original level)
. The NPC-Server must have read rights to the directory where the level to be copied can be found.
. The NPC-Server must have read/write rights to the directory where the copied level is going to be saved.
. There must be a placeholder file in the directory that you're going to save the copied level to that is bigger than 0 kb in order for the level to be saved correctly (assuming the directory didn't exist before and doesn't have any files in it).
. Avoid using "levels/" when defining your directories in both parameters.
. copylevel() can only be performed on the serverside.


Example

You wish to copy testLevel.nw from the levels/test/ directory into the levels/backup/test/ directory (assuming all the notes above are met):

PHP Code:
copylevel("test/testLevel.nw""backup/test/testLevel.nw"); 
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.