Welcome to the Builder Academy

Question Class.c - do_start

More
10 May 2021 17:00 #9860 by JTP
Class.c - do_start was created by JTP
The last 3 Lines after Else is Stock...then i tried do something special for half giants. When I only the Line with max_Hit(ch) it compiles file. But when I added mana and move and I try compile it. It says: expected Expressen before else.why can it compile fine with mana and move for half giants. But not with Them. Any idea ? 
Attachments:

Please Log in or Create an account to join the conversation.

More
10 May 2021 17:56 #9861 by thomas
Replied by thomas on topic Class.c - do_start
You have forgotten your curly braces.

Please Log in or Create an account to join the conversation.

More
10 May 2021 17:59 #9862 by JTP
Replied by JTP on topic Class.c - do_start
Just around the if part ?

Please Log in or Create an account to join the conversation.

More
10 May 2021 18:02 #9863 by JTP
Replied by JTP on topic Class.c - do_start
Tried around the if part. It compiled but testchar started with 100 mana and not 50

Please Log in or Create an account to join the conversation.

More
10 May 2021 18:06 #9864 by JTP
Replied by JTP on topic Class.c - do_start
And the move part isn’t working either.

Please Log in or Create an account to join the conversation.

More
10 May 2021 18:07 #9865 by thomas
Replied by thomas on topic Class.c - do_start
please, please read a C tutorial. This is absolute basics:
Code:
if (statement) { doStuff(); } else { doOtherStuff(); }

Please Log in or Create an account to join the conversation.

Time to create page: 0.254 seconds