Register | Login
Forum Index > Source Help > Help Moving On elseif
Author Message
Pages: 1
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1344] Help Moving On elseif - posted: 2013-02-24 17:59:42
okay im n00b at this code, i would like know which actions i should take next, ive tried this below elseif code and i can see the code, but whats the best easiest quickest correct procedure now, where to go from here?

Code:
program WIN32CUI 'test';
#include 'ch.zir';

  if (1 == 1) {
  eatnicefood
} elseif (1 == 2) {
  eatnicerfood
} else { 
  donteatnicefood 
}

Exitprocess(0); 


thx again
jack

jack.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1345] - posted: 2013-02-24 18:21:16
I would first suggest to start setting up some real conditions and then move on to functions/procedures

Code:
program WIN32CUI 'test';
#include 'ch.zir';

//procedures here
procedure eatnicefood() {
   print('Yum, that was nice!\r\n');
}

procedure eatnicerfood() {
   print('Mmmm, that was delicious!\r\n');
}

procedure donteatnicefood() {
   print('I\'m starving.... feed me!\r\n');
}
//

eax = 1;

if (eax == 1) {
   eatnicefood();
} elseif (eax == 2) {
   eatnicerfood();
} else { 
   donteatnicefood(); 
}

Exitprocess(0); 


g'luck

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1346] - posted: 2013-02-24 20:10:29
Hey thanks for the help i needed, I will follow them examples & see how i get on cheers for your time again respect what your doing mate
I will keep you posted n tnx for the gd-luck il need it smile

regards
jack ><

jack.
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1349] - posted: 2013-02-27 12:35:00
Is this okay so far mate then i will move onto macros e.g eax = 1 etc ;-)
Code:
program WIN32CUI 'con-fun-pro';
#include 'ch.zir';
//TODO - Code
  if (1 == 1) {
  our hubs a private hub
} elseif (1 == 2) {
  you can use our public hub
} else {
  you can use any public hub
}

// conditions functions procedures

procedure our hubs a private hub() {
  print('But, you need to be a member to enter our hub!\r\n');
}
procedure you can use our public hub() {
  print('Hey, you need to find it before you can enter our public hub!\r\n');  
}
procedure why dont you try public hubs() {
 print('Aha, you wont have a problem finding and entering other hubs!\r\n);
}


Exitprocess(0); 


jack.
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1350] - posted: 2013-02-27 14:55:57
Alright I`ve made a small mistake small one. I forgot to add --- >>[ ' ] after my last procedure call after \r\n'); instead i done --- >> \r\n); and missed out the all important --- >> [ ' ]
[code]
procedure why dont you try public hubs() {
print('Aha, you wont have a problem finding and entering other hubs!\r\n);
}
[\code]

when i should have called procedure this way

[code]
procedure why dont you try public hubs() {
print('Aha, you wont have a problem finding or entering other hubs!\r\n');
[\code]

i would have EDIT`d this but i think my browser hides the show edit button

REGARDS
jack

jack.
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1351] - posted: 2013-02-27 15:13:46
This is the one i corrected so far so good YEAH


Code:
 program WIN32CUI 'con-fun-pro';
#include 'ch.zir';
//TODO - Code
  if (1 == 1) {
  our hubs a private hub
} elseif (1 == 2) {
  you can use our public hub
} else {
  you can use any public hub
}

// conditions functions procedures

procedure our hubs a private hub() {
  print('But, you need to be a member to enter our hub!\r\n');
}
procedure you can use our public hub() {
  print('Hey, you need to find it before you can enter our public hub!\r\n');  
}
procedure why dont you try public hubs() {
 print('Aha, you wont have a problem finding and entering other hubs!\r\n');
}


Exitprocess(0);


Respect
Jack

jack.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1352] - posted: 2013-02-27 17:11:46
functions and procedures can not contain multiple words

Code:
program WIN32CUI 'con-fun-pro';
#include 'ch.zir';

// conditions functions procedures

procedure our_hubs_a_private_hub() {
  print('But, you need to be a member to enter our hub!\r\n');
}
procedure you_can_use_our_public_hub() {
  print('Hey, you need to find it before you can enter our public hub!\r\n');  
}
procedure why_dont_you_try_public_hubs() {
 print('Aha, you wont have a problem finding and entering other hubs!\r\n');
}


//TODO - Code
if (1 == 1) {
  our_hubs_a_private_hub();
} elseif (1 == 2) {
  you_can_use_our_public_hub();
} else {
  you_can_use_any_public_hub();
}


Exitprocess(0);


You need to try compile your code when you make changes, the compiler will notify you about mistakes.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 1 user(s) online. 0 member(s) and 1 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd