Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[batch] I wonder waths wrong with this

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Engineer
Expert Cheater
Reputation: 1

Joined: 25 Nov 2007
Posts: 170

PostPosted: Sat Dec 29, 2007 1:05 pm    Post subject: [batch] I wonder waths wrong with this Reply with quote

This is like my 2nd batch program and its all messed up O.O
Yes i know that the user interact wont 80% of the times match the user logic but meh.

Code:

@echo off
echo Simple move engine
echo.
echo Move with your arrow keys w,a,s,d.
echo.
echo Press a key!
PAUSE
cls

echo !-!
echo !--!
echo When you move, your "player" will apper.

:walk
set /p mov
if '%mov%' == 'w' goto %up%
if '%mov%' == 's' goto %down%
if '%mov%' == 'd' goto %right%
if '%mov%' == 'a' goto %left%

PAUSE

:up
cls
echo !d!
echo !--!
goto %walk%

:down
cls
echo !-!
echo !-d!
goto %walk%

:right
cls
echo !-!
echo !-d!
goto %walk%

:left
cls
echo !-!
echo !d-!
goto %walk%
[quote]

can anyone fix this?  :shock:  :shock:  :shock: [/quote]
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25957
Location: The netherlands

PostPosted: Sat Dec 29, 2007 1:29 pm    Post subject: Reply with quote

set /p mov= instead of set /p mov
and your down is the same as right

and don't forget to press enter

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sat Dec 29, 2007 1:45 pm    Post subject: Reply with quote

Try this code:
Code:
@echo off
echo Simple move engine
echo.
echo Move with your arrow keys w,a,s,d.
echo.
echo Press a key!
PAUSE
cls

echo !-!
echo !--!
echo When you move, your "player" will apper.

:walk
set /p mov=
if %mov% == w goto up
if %mov% == s goto down
if %mov% == d goto right
if %mov% == a goto left


:up
cls
echo  !d!
echo !---!
goto walk

:down
cls
echo  !-!
echo !-d-!
goto walk

:right
cls
echo  !-!
echo !--d!
goto walk

:left
cls
echo  !-!
echo !d--!
goto walk
Back to top
View user's profile Send private message
Elec0
Expert Cheater
Reputation: 0

Joined: 21 Nov 2007
Posts: 188
Location: Out of my mind, back in five minutes.

PostPosted: Sat Dec 29, 2007 3:07 pm    Post subject: Reply with quote

Wow. I didn't know that you could do that with a batch file. Apparently I need to look into batch's again.

~Elec0

_________________
Back to top
View user's profile Send private message MSN Messenger
Engineer
Expert Cheater
Reputation: 1

Joined: 25 Nov 2007
Posts: 170

PostPosted: Sun Dec 30, 2007 8:18 am    Post subject: Reply with quote

AAAAAAAAwwwwwwwww.... its still glitched.

After i press any movement key it closes
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sun Dec 30, 2007 8:57 am    Post subject: Reply with quote

It's working i checked again.
Back to top
View user's profile Send private message
Elec0
Expert Cheater
Reputation: 0

Joined: 21 Nov 2007
Posts: 188
Location: Out of my mind, back in five minutes.

PostPosted: Sun Dec 30, 2007 9:28 am    Post subject: Reply with quote

Indeed, I tried what HolyBlah posted, and it worked for me.
_________________
Back to top
View user's profile Send private message MSN Messenger
Engineer
Expert Cheater
Reputation: 1

Joined: 25 Nov 2007
Posts: 170

PostPosted: Sun Dec 30, 2007 12:05 pm    Post subject: Reply with quote

Nvm Shocked thanks for fixing my code blah Razz
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites