Help: If .... And....

Posts 1–6 of 6 · Page 1 of 1
Help: If .... And....
Hi!
I need help....

How do I make something like if....and.....?

Example:



Code:
if(GetAsyncKeyState(VK_SPACE)<0) and (fly = true)
That doesn't work, so I need ur help
[php]
if(GetAsyncKeyState(VK_NUMPAD0) && Fly == true)
[/php]
Quote Originally Posted by Void View Post
[php]
if(GetAsyncKeyState(VK_NUMPAD0) && Fly == true)
[/php]
[php]if(GetAsyncKeyState(VK_SPACE) && Fly == true) { [/php]

Doesn't work.... Get some errors:

Code:
error C2065: 'Fly' : undeclared identifier

warning C4805: '==' : unsafe mix of type ''unknown-type'' and type 'bool' in operation


EDIT: Fixed it, request close.

if(GetAsyncKeyState(VK_SPACE) && (fly = true)) {
If you've done the basics of C++ you should have instantly known what the problem was, whenever you see that error. I can see you're trying to make a hack there, I suggest starting by the basics if you already havent'.

My bad if you've done them already.
I detect a failure in if(GetAsyncKeyState(VK_SPACE) && (fly = true)) {
good point Retox. This is extremely basic. You need to learn C++, so you will even understand how an if statement works.
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us