|
Re: Lite-C Workshops function compute_days()
[Re: FireArm]
#210719
06/12/08 13:30
06/12/08 13:30
|
Joined: Sep 2005
Posts: 274 Switzerland - Zurich
zwecklos
Member
|
Member
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
|
Hi there, you have to put your function above the main function. the enginge reads your script from the top till downside. like reading a book.
... .. . /////////////////////////////////////////////////////////////// function compute_days() { number_of_days = my_age * days_a_year; } /////////////////////////////////////////////////////////////// function main() { screen_color.blue = 150; compute_days(); } ///////////////////////////////////////////////////////////////
cheers
Last edited by zwecklos; 06/12/08 13:31.
|
|
|
Re: Lite-C Workshops function compute_days()
[Re: DJBMASTER]
#210751
06/12/08 16:24
06/12/08 16:24
|
Joined: Jul 2006
Posts: 76 uk london
FireArm
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2006
Posts: 76
uk london
|
thank's also is it possable to use "if" just to check 1 thing?.
for example if shutdowngame is equal to 0 the games shuts down, with no "else" or "or"
i tryed this but it dont work if (shutdowngame == 0) { sys_exit(NULL); }
-------------------------------------------------------- Edit fixed it while(1) { if (shutdowngame == 0) { sys_exit(NULL); } wait(1); }
Last edited by FireArm; 06/12/08 19:09.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|