May 14, 2024, 05:39:01 AM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Latest WME version:
WME 1.9.1
(January 1st, 2010) -
download
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
STRING TABLE . Maybe a bug
« previous
next »
Pages: [
1
]
Print
Author
Topic: STRING TABLE . Maybe a bug (Read 2798 times)
0 Members and 1 Guest are viewing this topic.
leucome
Occasional poster
Karma: 0
Offline
Gender:
Posts: 86
STRING TABLE . Maybe a bug
«
on:
September 17, 2006, 07:41:43 AM »
--Ok this line work.
this.Caption=("Arc " + "Exp:" + ToInt(this.Exp) + " Lvl:" + this.Lvl +" Précision:" + ToInt((this.Precision * actor.Precision)/100) +" Vitesse:" + ToInt(FireSpeed));
--In this All the line is replaced by /ITEM002/ do you think this is normal? or some kind of bug.
this.Caption=("/ITEM0002/ Arc" + "Exp:" + ToInt(this.Exp) + " Lvl:" + this.Lvl +" Précision:" + ToInt((this.Precision * actor.Precision)/100) +" Vitesse:" + ToInt(FireSpeed));
--I tried to place "/ITEM0002/ Arc" in a variable and use the variable and this way all the line is replaced by /ITEM002/ content too.
var name = "/ITEM0002/ Arc";
this.Caption=(name + "Exp:" + ToInt(this.Exp) + " Lvl:" + this.Lvl +" Précision:" + ToInt((this.Precision * actor.Precision)/100) +" Vitesse:" + ToInt(FireSpeed));
«
Last Edit: September 17, 2006, 07:43:57 AM by leucome
»
Logged
Look my Site ——►
http://news.leucome.ca
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re: STRING TABLE . Maybe a bug
«
Reply #1 on:
September 17, 2006, 08:15:08 AM »
It's by design. The string is expanded when it's assigned to the Caption property, and by that time all the parts are already concatenated. You'd have to do something like this to explicitly expand the relevant parts:
this.Caption = Game.ExpandString("/ITEM0002/Arc") + "Exp:" + .... ;
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
leucome
Occasional poster
Karma: 0
Offline
Gender:
Posts: 86
Re: STRING TABLE . Maybe a bug
«
Reply #2 on:
September 17, 2006, 08:57:51 AM »
Thank's
This do the work perfectly !
Logged
Look my Site ——►
http://news.leucome.ca
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
STRING TABLE . Maybe a bug