Quick question, how do you get text2path() to work? This won't work for me:
var/icon/I = icon(text2path("/icon/[T][a].png"))
Sure it compiles but fails at runtime. Or am I going about getting icon's filename to work according to variable all wrong?
ID:169028
Aug 3 2005, 8:58 am
|
|
text2path is for type paths. Like text2path("/mob/Player/[Class]"). I think icon() might accept icon('/icon/[T][A].png') though
|
In response to Deadron
|
|
Basically, I'm trying to loop through some files that follow a specific organization. So by editing the variable a and T accordingly, I need to refer to the actual file.
So my files may be: Clown1.png Clown2.png Clown3.png I need a way to refer to them as a variable. |
In response to DeathAwaitsU
|
|
DeathAwaitsU wrote:
Basically, I'm trying to loop through some files that follow a specific organization. So by editing the variable a and T accordingly, I need to refer to the actual file. Then ignore text2path() and check out file(). |
In response to Deadron
|
|
This works too:
mob/verb/Test() |
What are you trying to do here?
/icon/something.png
is not a proper object path, which what text2path() is about. If this is supposed to be a file on disk, that's a whole different kind of path...