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 04-17-2007, 08:43 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Request: getfilepath(file)

Would return the filepath of the file. [If not a file, make it level please!]
Reply With Quote
  #2  
Old 04-17-2007, 09:03 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
I'm pretty sure that is just a way to format a string.
Like if you have:
"levels/images/block.png"
And put that into the function, it would return:
"levels/images/"
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 04-17-2007, 10:36 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Chandler View Post
Would return the filepath of the file. [If not a file, make it level please!]


Well, there is always the /find command on RC that does this already, though that probably wouldn't help you if you were scripting a system or so.


I guess it would depend on what you would need it for.
Reply With Quote
  #4  
Old 04-17-2007, 10:44 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Yeah, scripting purposes... :[
Reply With Quote
  #5  
Old 04-18-2007, 12:02 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
There is findfiles(pattern,recursive) which also gives the "full" path
Reply With Quote
  #6  
Old 04-18-2007, 08:08 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
GraalScript: Function findfiles not found at line 18 in script of Control_LevelGenerator

:[
Reply With Quote
  #7  
Old 04-18-2007, 09:39 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chandler View Post
GraalScript: Function findfiles not found at line 18 in script of Control_LevelGenerator

:[
Serverside?
__________________
Skyld
Reply With Quote
  #8  
Old 04-18-2007, 10:05 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
I'm pretty sure that is just a way to format a string.
Like if you have:
"levels/images/block.png"
And put that into the function, it would return:
"levels/images/"
What you're thinking of is extractfilepath().

Edit: By the way, I would just love to be able to add in global functions.
__________________
Reply With Quote
  #9  
Old 04-18-2007, 10:19 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
What you're thinking of is extractfilepath().

Edit: By the way, I would just love to be able to add in global functions.
Ahh that's it.
Didn't bother to look it up :P
__________________
Do it with a DON!
Reply With Quote
  #10  
Old 04-18-2007, 06:55 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Skyld View Post
Serverside?
Yeah. Maybe it needs restarting!
Reply With Quote
  #11  
Old 04-18-2007, 11:21 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Chandler View Post
Yeah. Maybe it needs restarting!
I can't tell if that was sarcasm or not.
__________________
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 03:15 PM.


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