Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: STRING TABLE . Maybe a bug  (Read 2791 times)

0 Members and 1 Guest are viewing this topic.

leucome

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 86
    • View Profile
    • Leucome Games
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 Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
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. ::wave

leucome

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 86
    • View Profile
    • Leucome Games
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
 

Page created in 0.036 seconds with 21 queries.