Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Request: getfilepath(file) (https://forums.graalonline.com/forums/showthread.php?t=73535)

Chandler 04-17-2007 08:43 PM

Request: getfilepath(file)
 
Would return the filepath of the file. [If not a file, make it level please!]

zokemon 04-17-2007 09:03 PM

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/"

Gambet 04-17-2007 10:36 PM

Quote:

Originally Posted by Chandler (Post 1300693)
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.

Chandler 04-17-2007 10:44 PM

Yeah, scripting purposes... :[

Admins 04-18-2007 12:02 AM

There is findfiles(pattern,recursive) which also gives the "full" path

Chandler 04-18-2007 08:08 AM

GraalScript: Function findfiles not found at line 18 in script of Control_LevelGenerator

:[

Skyld 04-18-2007 09:39 AM

Quote:

Originally Posted by Chandler (Post 1300891)
GraalScript: Function findfiles not found at line 18 in script of Control_LevelGenerator

:[

Serverside?

Inverness 04-18-2007 10:05 AM

Quote:

Originally Posted by zokemon (Post 1300704)
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.

zokemon 04-18-2007 10:19 AM

Quote:

Originally Posted by Inverness (Post 1300908)
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

Chandler 04-18-2007 06:55 PM

Quote:

Originally Posted by Skyld (Post 1300905)
Serverside?

Yeah. Maybe it needs restarting!

Inverness 04-18-2007 11:21 PM

Quote:

Originally Posted by Chandler (Post 1300988)
Yeah. Maybe it needs restarting!

I can't tell if that was sarcasm or not.


All times are GMT +2. The time now is 02:52 PM.

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