Discussion of Inner Space
Moderators: Lavish Software Team, Moderators
-
Xeon
- Non-Subscriber
- Posts: 10
- Joined: Mon Jan 22, 2007 2:30 am
Post
by Xeon » Mon Apr 16, 2007 5:36 pm
Lax,
Is this possible to have a Variable name in a template Filename definition?
Code: Select all
<Template Name="VG.Texture" Filename="${Script[VGCraftBot].Variable[installPath]}\VGUIAssets\Shells \Default\Textures\VgrdParts.tga">
Thanks!
-
Lax
- Owner
- Posts: 6634
- Joined: Fri Jun 18, 2004 6:08 pm
Post
by Lax » Tue Apr 17, 2007 6:30 am
Nope
Also, don't use script.Variable[]. use ${Script[x].Variable.installPath}

-
Xeon
- Non-Subscriber
- Posts: 10
- Joined: Mon Jan 22, 2007 2:30 am
Post
by Xeon » Wed Apr 18, 2007 5:00 pm
Lax wrote:Nope
Also, don't use script.Variable[]. use ${Script[x].Variable.installPath}

I tried converting a few over to that syntax (in my UI.xml file) and it wouldn't recognize them:
Code: Select all
${Script[VGCraftBot].Variable.varName}
is that the right syntax?
-
Lax
- Owner
- Posts: 6634
- Joined: Fri Jun 18, 2004 6:08 pm
Post
by Lax » Thu Apr 19, 2007 10:24 am
Woops, what was I thinking. it's ${Script[x].VariableScope.installPath}
-
Unchayned
- GamingTools Subscriber
- Posts: 51
- Joined: Sat Oct 09, 2004 9:22 am
Post
by Unchayned » Fri Apr 20, 2007 2:18 am
Out of curiosity, what's wrong with the first way? (I've seen several scripts use this) I take it the index lookup is more expensive?
-
Lax
- Owner
- Posts: 6634
- Joined: Fri Jun 18, 2004 6:08 pm
Post
by Lax » Fri Apr 20, 2007 9:45 am
The first way is just that -- the first way. I dont know what I was thinking when I made it. script.VariableScope is the correct way. The old way is only there for compatibility