Im trying to get this to work. It works until I add the last 2 lines.Code:if (input == 'n' && NewUser.location->north)
NewUser.location = NewUser.location->north;
if (input == 's' && NewUser.location->south)
NewUser.location = NewUser.location->south;
if (input == 'e' && NewUser.location->east)
NewUser.location = NewUser.location->east;
if (input == 'w' && NewUser.location->west)
NewUser.location = NewUser.location->west;
if (input != 'n') or (input != 's') or (input != 'e') or (input != 'w')
NewUser.location = NewUser.location;
these ones :
Code:if (input != 'n') or (input != 's') or (input != 'e') or (input != 'w')
NewUser.location = NewUser.location;
Then I get this :
P:\KOAGAME\main.cpp||In function `int main(int, char**)':|
P:\KOAGAME\main.cpp|598|error: expected primary-expression before '||' token|
P:\KOAGAME\main.cpp|599|error: expected `;' before "NewUser"|
||=== Build finished: 2 errors, 0 warnings ===|
It is in same format so Im not sure what im doing wrong, I tried changing everything around and using && instead of or's but I really need it run like this :
If input does not equal either n s e w , then location stays same.
Wondering if anyone could enlighten me
thanks