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 


Learning How To Program (HELP)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
zaczac
Master Cheater
Reputation: 0

Joined: 01 May 2007
Posts: 266
Location: Ontario, Canada

PostPosted: Fri Sep 26, 2008 5:18 pm    Post subject: Learning How To Program (HELP) Reply with quote

Well i just started my computer programming course and our first assignment is to make a game of hang man.... -.-, i'm so lost lol
so heres what i got so far

var numb : int
put "Guess a number from 1 to 20. Type 100 to exit"
loop
get numb
if numb = 1 then
put "Number enterned is 1"
end if
if numb = 2 then
put "Number enterned is 2"
end if
if numb = 3 then
put "Number enterned is 3"
end if
if numb = 4 then
put "Number enterned is 4"
end if
if numb = 5 then
put "Number enterned is 5"
end if
if numb = 6 then
put "Number enterned is 6"
end if
if numb = 7 then
put "Number enterned is 7"
end if
if numb = 8 then
put "Number enterned is 8"
end if
if numb = 9 then
put "Number enterned is 9"
end if
if numb = 10 then
put "Number enterned is 10"
end if
if numb = 11 then
put "Number enterned is 11"
end if
if numb = 12 then
put "Number enterned is 12"
end if
if numb = 13 then
put "Number enterned is 13"
end if
if numb = 14 then
put "Number enterned is 14"
end if
if numb = 15 then
put "Number enterned is 15"
end if
if numb = 16 then
put "Number enterned is 16"
end if
if numb = 17 then
put "Number enterned is 17"
end if
if numb = 18 then
put "Number enterned is 18"
end if
if numb = 19 then
put "Number enterned is 19"
end if
if numb = 20 then
put "Number enterned is 20"
end if
if numb = 3 then
put "Correct Answer!"
else
put "Number entered is not the correct answer"
end if
exit when numb = 100
setscreen ("graphics")
if numb = 1 then
drawoval (590, 250, 30, 30, red)
end if
end loop




this is just a start and im kinda lost on what to do next :\, i need to make it so one number out of twenty is the correct answer and everytime you guess a wrong answer it will draw another body part - head,body,arms and legs, "hangman" Razz
if anyone wants to help me with this feel free to post, again im new to this and i know that it sucks -.-
btw im using a program called Turing i think it uses java.. not 100% sure tho

Thanks in advanced Very Happy! Wink Wink
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Fri Sep 26, 2008 5:21 pm    Post subject: Reply with quote

Holy Shi...

Code:
var numb : int
    put "Guess a number from 1 to 20. Type 100 to exit"
    get numb
    if numb != 100 then
    put "Number enterned is " + numb
    else exit


Doesn't support anything like that?...
Back to top
View user's profile Send private message MSN Messenger
zaczac
Master Cheater
Reputation: 0

Joined: 01 May 2007
Posts: 266
Location: Ontario, Canada

PostPosted: Fri Sep 26, 2008 5:24 pm    Post subject: Reply with quote

HUH? O_O im not sure... lol like i said im new to this
it would help if you could explain what that did
thank for posting tho Very Happy

Btw heres the site to the program its free and very small in size.
http://www.holtsoft.com/
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Sat Sep 27, 2008 2:00 pm    Post subject: Reply with quote

the fuck.....looks like a C++ put in the syntax of that autoit type program people used to use for maplestory ban meing and botting

my suggestion,

learn C++ first

www.cplusplus.com/tutorial

then come back and ask for help when u get stuck..

_________________
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sat Sep 27, 2008 2:36 pm    Post subject: Reply with quote

I believe he is using OOTuring...and old program used in some programming classes. It is like ACTools, yet it can do simple graphics such as ovals, boxes, and such. When I was in grade 10 i used it, and it was even shittier than autoit or actools.

the company went outa buisness, and now gives it out for shareware.

http://www.holtsoft.com/turing/

IT is the easiest langauge to learn. I got 98% in that course Rolling Eyes

http://compsci.ca/v3/index.php?h=1&pf=120

Code:
var num, rnum : int

loop
    rnum := Rand.Int (1, 20)
    put "Please Pick A Number between 1 and 20. 100 is to Exit."

    loop
   
        get num
       
        if rnum = num then
            put "You guessed it!"
            exit
        else
            put "Wring. Guess Again."
        end if
       
    end loop
   
end loop


This draws nothing, but annalyse it to understand it more.

_________________
Back to top
View user's profile Send private message Send e-mail
zaczac
Master Cheater
Reputation: 0

Joined: 01 May 2007
Posts: 266
Location: Ontario, Canada

PostPosted: Sat Sep 27, 2008 5:42 pm    Post subject: Reply with quote

alright thanks Razz it is an old program -.- and im still lost on how to get it to draw things Razz
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Sep 28, 2008 6:10 am    Post subject: Reply with quote

Wow!, that's a lot of "if" statements, either use Switch/Case or just do it like:

Code:
var nInteger: Int;
begin
nInteger := StrToInt(Edit1.Text); //Convert the string to int and store it in the variable
ShowMessageFMT('Your number is: %d', [nInteger]); //FMT = Format()
end;
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sun Sep 28, 2008 6:29 am    Post subject: Reply with quote

Rot1 wrote:
Wow!, that's a lot of "if" statements, either use Switch/Case or just do it like:

Code:
var nInteger: Int;
begin
nInteger := StrToInt(Edit1.Text); //Convert the string to int and store it in the variable
ShowMessageFMT('Your number is: %d', [nInteger]); //FMT = Format()
end;


for the last time, this is not c++ it's turing. I don't even know what you typed! It's like a cross between the two lol

_________________
Back to top
View user's profile Send private message Send e-mail
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Sun Sep 28, 2008 7:09 am    Post subject: Reply with quote

kitterz wrote:
Rot1 wrote:
Wow!, that's a lot of "if" statements, either use Switch/Case or just do it like:

Code:
var nInteger: Int;
begin
nInteger := StrToInt(Edit1.Text); //Convert the string to int and store it in the variable
ShowMessageFMT('Your number is: %d', [nInteger]); //FMT = Format()
end;


for the last time, this is not c++ it's turing. I don't even know what you typed! It's like a cross between the two lol

Its delphi...

_________________
Gone
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Sep 28, 2008 7:22 am    Post subject: Reply with quote

GMZorita wrote:
kitterz wrote:
Rot1 wrote:
Wow!, that's a lot of "if" statements, either use Switch/Case or just do it like:

Code:
var nInteger: Int;
begin
nInteger := StrToInt(Edit1.Text); //Convert the string to int and store it in the variable
ShowMessageFMT('Your number is: %d', [nInteger]); //FMT = Format()
end;


for the last time, this is not c++ it's turing. I don't even know what you typed! It's like a cross between the two lol

Its delphi...


kitterz: That was not C++.

If you want in C:

Code:
enum aArray = {a=0,a1,a2,a3,a4,a5,a6,a7,a8, a9=10};
void main(void)
{
int c;
printf("Enter a number between 0 to 10\n");
scanf_s("%d", &c); //_s to avoid warning(s)
if(c == aArray)
printf("your number is: %d\n", c)
else printf("lol, don't trick me\n");
return;
}
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sun Sep 28, 2008 8:10 am    Post subject: Reply with quote

Rot1 wrote:
GMZorita wrote:
kitterz wrote:
Rot1 wrote:
Wow!, that's a lot of "if" statements, either use Switch/Case or just do it like:

Code:
var nInteger: Int;
begin
nInteger := StrToInt(Edit1.Text); //Convert the string to int and store it in the variable
ShowMessageFMT('Your number is: %d', [nInteger]); //FMT = Format()
end;


for the last time, this is not c++ it's turing. I don't even know what you typed! It's like a cross between the two lol

Its delphi...


kitterz: That was not C++.

If you want in C:

Code:
enum aArray = {a=0,a1,a2,a3,a4,a5,a6,a7,a8, a9=10};
void main(void)
{
int c;
printf("Enter a number between 0 to 10\n");
scanf_s("%d", &c); //_s to avoid warning(s)
if(c == aArray)
printf("your number is: %d\n", c)
else printf("lol, don't trick me\n");
return;
}


I know now =p.

It's just that we were talking about turing when people start talking about C++ and i guess delphi. Rolling Eyes

If you ask for help in, say C++, would it be appropriate to give a sniplet that is in vb or Pascal?

_________________
Back to top
View user's profile Send private message Send e-mail
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