I am getting an expected primary-expression before '=' token, how can I fix this?

void vldtmv()
{
    if ( brd[opx][opy].cont[1]=='H' )
    {
        if ( ( npx - opx !== 2 && -2 || npy - opy !== 1 && -1 ) && (npx-opx !== 1 && -1 || npy-opy !== 2 && -2) )
        {
            type=1;
        }
    }
}

Recommended Answers

All 2 Replies

on which line does the error appear?

don't really get your code as i'm a total noob but

if ( ( npx - opx !== 2 && -2 || npy - opy !== 1 && -1 ) && (npx-opx !== 1 && -1 || npy-opy !== 2 && -2) )

should these !== not be just != ?
may be completely wrong though.

commented: you are right :) +34
commented: awesomeness +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.