Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-27-2012, 01:39 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
can't figure out deletelevel()

Here's a weapon script. It copies the level fine but then won't delete it. Help plz.

PHP Code:
function onActionServerSide(temp.dothis) {
  if(
temp.dothis == "CL"){
    
copylevel("ph8_test.nw""events/deletetest.nw");
    
player.chat "Triggered create";
  }
  elseif(
temp.dothis == "DL"){
    
deletelevel("events/deletetest.nw");
    
player.chat "Triggered delete";
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if(
player.chat == "copy level") {
    
triggerServer("gui"this.name"CL");
  }
  elseif(
player.chat == "delete level"){
    
triggerServer("gui"this.name"DL");
  }

__________________
-Ph8
Reply With Quote
  #2  
Old 03-27-2012, 02:04 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Try:

deletefile("levels/events/deletetext.nw");

If the (npcserver) doesn't have rw rights to the level then it won't be able to delete.
__________________
Quote:
Reply With Quote
  #3  
Old 03-27-2012, 03:12 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
Try:

deletefile("levels/events/deletetext.nw");

If the (npcserver) doesn't have rw rights to the level then it won't be able to delete.
Thanks, the npcserver not having rights was the problem!
__________________
-Ph8
Reply With Quote
Reply


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 01:46 AM.


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