Lable Sting Format problem

Started by Slasher, Thu 06/09/2018 19:18:14

Previous topic - Next topic

Slasher

Using this I am getting the comma, after the closing".


Code: ags

  LSirens.Text=(String.Format("%s,%s,%s,%s",
  "It is said that Hera, queen of the gods, persuaded the Sirens to enter a singing contest with the Muses.",
  "[[The Muses won and the Sirens were banished into the sea at Ghoul as sea nymphs.",
  "[[The Sirens took revenge by luring sailors onto sharp rocks by their beautiful voices where they proceeded to devour them.",
  "[[The only way to overcome the Sirens when they are wailing is to play a beautiful song which will cause the Sirens to die."));
  

dayowlron

change the string format to "%s%s%s%s" and try it otherwise there will be a comma after every sentence. Is that what you want?
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

dayowlron

You could also change it to:
Code: ags

  LSirens.Text=(String.Format("%s[[%s[[%s[[%s",
  "It is said that Hera, queen of the gods, persuaded the Sirens to enter a singing contest with the Muses.",
  "The Muses won and the Sirens were banished into the sea at Ghoul as sea nymphs.",
  "The Sirens took revenge by luring sailors onto sharp rocks by their beautiful voices where they proceeded to devour them.",
  "The only way to overcome the Sirens when they are wailing is to play a beautiful song which will cause the Sirens to die."));
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

Slasher

Hi,

I can't believe i added an , between strings %s... What a plonker :-[

cheers

dayowlron

Just takes a second eye to look at it sometimes.
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

SMF spam blocked by CleanTalk