Results 1 to 4 of 4
  1. #1
    GeorgeGFX's Avatar secret.club

    Join Date
    Nov 2010
    Country
    Posts
    15,459
    Thanked
    2,331
    Thanks
    5,080
    This cvnt doesn't want to compile my shit, here's the 4 lines code example;




    Changed the building compiler to C# 7.1 - nothing, installed Microsoft.CodeDom.Providers.DotNetCompilerPlatform - nothing, ideas?

    >>> Credits to Sikk408 @ DevaintArt <<<

  2. The following user said thank you to GeorgeGFX for this useful post:

    Canpai (07-24-2017)

  3. #2
    Junior Member

    Join Date
    Jan 2015
    Country
    Posts
    335
    Thanked
    206
    Thanks
    291
    I had issues with this too, don't know how to fix this
    but in that particular example you could just do
    Console.WriteLine(wormsLength:F2) couldn't you

    I experienced those issues when doing e.g. $"hi {day == 1 ? variable : variable (heres when it would mess up)} hi"
    to solve that you could just do "hi " + day == 1 ? variable : variable + " hi", although it probably isn't preferable...
    Last edited by Skilly; 07-24-2017 at 05:54 PM.

  4. The following user said thank you to Skilly for this useful post:

    Canpai (07-24-2017)

  5. #3
    Bunny's Avatar woof.

    Join Date
    Mar 2014
    Country
    Posts
    5,292
    Thanked
    2,873
    Thanks
    1,244
    last time i checked, the $ operator can only be applied to strings..?
    try to surround your variable in " 's, like this
    Code:
    Console.WriteLine($"{wormsLength:F2}");
    Last edited by Bunny; 07-24-2017 at 06:00 PM.

  6. The following 2 users say thank you to Bunny for this useful post:

    Canpai (07-24-2017), GeorgeGFX (07-24-2017)

  7. #4
    GeorgeGFX's Avatar secret.club

    Join Date
    Nov 2010
    Country
    Posts
    15,459
    Thanked
    2,331
    Thanks
    5,080
    Originally Posted by Bunny View Post
    last time i checked, the $ operator can only be applied to strings..?
    try to surround your variable in " 's, like this
    Code:
    Console.WriteLine($"{wormsLength:F2}");
    Ow yeah I forgot them quotes lol, my head was so messed up from trying to fix that stupid error with the compiler I messed up my syntax, thanks.

    >>> Credits to Sikk408 @ DevaintArt <<<

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)