Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7985279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:30:34+00:00 2026-06-04T11:30:34+00:00

private static long CalculateScore(byte chances, long millisec) { int score; byte num1 = chances++;

  • 0
private static long CalculateScore(byte chances, long millisec) { int score; byte num1 = chances++; byte num2 = (byte)10; byte num3 = (byte)10; switch (Program.currLevelIndex) { case (byte)7: num2 = (byte)10; break; case (byte)11: num2 = (byte)20; break; case (byte)15: num2 = (byte)40; break; }

    if ((int)chances >= 1 && (int)chances <= 3)
        num1 = (byte)40;
    else if ((int)chances >= 4 && (int)chances <= 6)
        num1 = (byte)20;
    else if ((int)chances > 7)
        num1 = (byte)10;
    if (millisec > 480000L)
        num3 = (byte)10;
    else if (millisec >= 240000L && millisec <= 480000L)
        num3 = (byte)20;
    else if (millisec < 240000L)
        num3 = (byte)40;
    try
    {
        score = Convert.ToInt32((int)num2 * (int)num1 * (int)num3);
    }
    catch
    {
        score=0;
    }

    Console.SetCursorPosition(Program.x, Program.y);
    Console.Write("Your Score was: " + score);

}`

The error is CalculateScore & I can’t find the mistake. this is a method is to work ou Help is nedeed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:30:36+00:00Added an answer on June 4, 2026 at 11:30 am

    You specified that the function will return a value of type long, but there is no return statement returning a value at the end of the function

    You need to add

    return score;
    

    as score is the result of the calculation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public class StoreMessage extends Thread implements Serializable{ private static long start_nanotime=System.nanoTime(); private static int
My Algo- private static MyList skip$DeleteItem(MyList L , int M , int N){ MyList
public class Encryption { private static final int[] encrypt = {2, 9, 3, 4,
public class Encryption { private static final int[] encrypt = {2, 9, 3, 4,
The following function is used to compute memory usage. private static long getMemoryUse(){ putOutTheGarbage();
I wrote recursive method to calculate folder size: private static long calcSize(File dir) {
public class SuperUser extends User implements Serializable{ private static final long serialVersionUID = 1L;
ENTITY CLASS : public class MyUser implements Serializable { private static final long serialVersionUID
${sessionScope.pricer.applicableRateCode} public class ViewPrices implements Cloneable, Serializable { private static final long serialVersionUID =
public class LevelEditorButton extends JButton { /** * */ private static final long serialVersionUID

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.