please help me

Posts 115 of 16 · Page 1 of 2
please help me
i need help

this is my code:
Code:
	if(GetAsyncKeyState(VK_NUMPAD0)<1){ //numpad 1 for MineShit
		if(MineShit){
			PushToConsole("MineShit 0");
			MineShit = false;
		} else {
			PushToConsole("MineShit 1");
			MineShit = true;
		}
	}
credits

  • CodeDemon
i showed you the error like the rules said to please help me i provided my code also
Quote Originally Posted by dugindog View Post
i need help

this is my code:
Code:
	if(GetAsyncKeyState(VK_NUMPAD0)<1){ //numpad 1 for MineShit
		if(MineShit){
			PushToConsole("MineShit 0");
			MineShit = false;
		} else {
			PushToConsole("MineShit 1");
			MineShit = true;
		}
	}

FAIL you just copied this from the thread I posted it in and renamed the variable.

You arent declaring the variable thats why

C+Ped from here http://www.mpgh.net/forum/207-combat...-features.html
can u help i gave credits
I got the fix

bool MineShit;
First of declare the variable:

bool MineShit = false;

second, You changed the

Code:
	if(GetAsyncKeyState(VK_NUMPAD0)<0){ //numpad 0 for nx chams
to

Code:
	if(GetAsyncKeyState(VK_NUMPAD0)<1){ //numpad 1 for MineShit
I'm guessing thats an effort to change it to numpad 1? Thats completely incorrect. You are changing the wrong value. you change the VK_NUMPAD0 to VK_NUMPAD1
it is illegal

what about

Code:
if(MineShit){
Quote Originally Posted by dugindog View Post
it is illegal

what about

Code:
if(MineShit){
What are you trying to say?
it is still an invalid identifier
Quote Originally Posted by dugindog View Post
it is still an invalid identifier
Because you probable didnt declare it

Code:
bool Mineshit=false;
where are you declaring it?
Lol declare it , then try re compiling it , and watch you errors go away. Also

you C+P'ed xD

When you declare , put it all the way on top of base.cpp .
Quote Originally Posted by Drake4 View Post
Lol declare it , then try re compiling it , and watch you errors go away. Also

you C+P'ed xD

When you declare , put it all the way on top of base.cpp .
Not all variables have to be declared in a global scope.
What is MineShit ?
Posts 115 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?