Results 1 to 9 of 9
  1. #1
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default Malformed expression: "(ERROR)"<

    if (m_pScorePanel.m_pTeam[0].m_iRunsMadeByFTeam <= 10/*m_Team[1].m_iRunsMadeByFTeam*/ ) {
    m_pCrickMain.menu();
    }
    when if condition execute than it shows :-
    .m_iRunsMadeByFTeam = >Malformed expression: "(ERROR)"<

    what is mean of this.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,457
    Rep Power
    25

    Default

    Could you show the line of code that produces the error message. What you have posted has a comment in the middle of it.
    Also please post the full text of the error message.

    What data type is m_pTeam? Does it have a member: m_iRunsMadeByFTeam

  3. #3
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default

    this one is line which shows error message-
    if (m_pScorePanel.m_pTeam[0].m_iRunsMadeByFTeam <= 10/*m_Team[1].m_iRunsMadeByFTeam*/ ) {
    //.........
    }
    and these two line contain info of two team-

    m_pTeam = new CTeam[2];

    m_pTeam[0] = new CTeam(sTeam1, sPlayers1, 11);
    m_pTeam[1] = new CTeam(sTeam2, sPlayers2, 11);

    Actually i compare two variable(which contain score for both team ) of team one and team two
    and m_iRunsMadeByFTeam contain Score.which will decide who won the match.

  4. #4
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    You post makes no sense. As Norm mentioned your if statement has a comment in the middle of it which makes it hard to read. If it has no business being there then delete it.

    Do you get a compile time or run time error? Copy and paste the FULL and EXACT error message which contains vital information. Do not post what you think the error message is.

  5. #5
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default

    forget comment this is not necessary.but if u want than i write this line in proper way:-
    if (m_pScorePanel.m_pTeam[0].m_iRunsMadeByFTeam <= m_Team[1].m_iRunsMadeByFTeam ) {
    //.........
    }
    and m_iRunsMadeByFTeam are same variable for both team.

  6. #6
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    What about the error message? That is way more important than removing a bit of unnecessary code.

  7. #7
    Ashish_jain's Avatar
    Ashish_jain is offline Member
    Join Date
    Jun 2011
    Posts
    32
    Rep Power
    0

    Default

    Ok but have u knowledge about this problem?

  8. #8
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,798
    Rep Power
    7

    Default

    FFS!

    AS SOON AS YOU POST THE FULL AND EXACT FRIGGIN ERROR MESSAGE I MIGHT KNOW MORE!

    Until then all I can suggest is you remove the wrong code and replace it with the correct code.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,015
    Rep Power
    20

    Default

    I've seen this a lot recently, where we ask for full error messages with stack traces and it simply gets ignored, time and again.
    It's really, really frustrating.

Similar Threads

  1. Replies: 4
    Last Post: 05-27-2011, 08:21 AM
  2. Error: "Illegal start of expression"
    By mokitooo_1994 in forum New To Java
    Replies: 5
    Last Post: 05-12-2011, 09:42 PM
  3. "illegal start of expression"
    By 3RDofApril in forum AWT / Swing
    Replies: 2
    Last Post: 11-04-2010, 01:39 AM
  4. Replies: 1
    Last Post: 11-20-2009, 07:58 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •