Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, clint000, Grant), 6,810 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
variable does not operate #304169
01/05/10 15:41
01/05/10 15:41
Joined: Jan 2010
Posts: 3
C
chuj Offline OP
Guest
chuj  Offline OP
Guest
C

Joined: Jan 2010
Posts: 3
Hi

i begins to learn from this page http://tutorial.3dgamestudio.net/

and i have problem with code (lesson 3)

CODE
Code:
#include <acknex.h>
#include <default.c>

var my_age = 33;
var days_a_year = 365;
var number_of_days; // we need to calculate this value

////////////////////////////////////////////////////////////////////

PANEL* pDisplay =
{
	digits (10, 10, 5, *, 1, number_of_days);
	flags = VISIBLE;
	
}

/////////////////////////////////////////////////////////////////////
function main () 
{ 
screen_color.blue = 150; 
	compute_days ();
}

 
 compute_days function ()
 {
 number_of_days = my_age * days_a_year;
 }






how to write good code. I'm begginer noob grin

Last edited by chuj; 01/05/10 17:19.
Re: variable does not operate [Re: chuj] #304172
01/05/10 16:02
01/05/10 16:02
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Code:
compute_days function ()
 {
 number_of_days = my_age * days_a_year;
 }


Should be
Code:
function compute_days  ()
 {
 number_of_days = my_age * days_a_year;
 }


And the function must be placed at the top before you call it.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: variable does not operate [Re: Ottawa] #304176
01/05/10 16:12
01/05/10 16:12
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
also, main has to be written after your function, otherwise it will still give an error (because the function is unknown).

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: variable does not operate [Re: Helghast] #304178
01/05/10 16:35
01/05/10 16:35
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Quote:
also, main has to be written after your function, otherwise it will still give an error (because the function is unknown).

Ottawa already said that tongue


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: variable does not operate [Re: chuj] #304182
01/05/10 17:05
01/05/10 17:05
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Originally Posted By: chuj




how to write good code. I'm begginer noob grin


HE IS USING A CRACK!!!

are you others blind?

Re: variable does not operate [Re: Rei_Ayanami] #304187
01/05/10 17:22
01/05/10 17:22
Joined: Jan 2010
Posts: 3
C
chuj Offline OP
Guest
chuj  Offline OP
Guest
C

Joined: Jan 2010
Posts: 3
I have no money for full version, but collect money to buy, So far I have a different version:)So do not be funny because no one at once, eg you do not buy 3d studio max, 3d game stuido etc

Ottawa thx, work

Re: variable does not operate [Re: chuj] #304197
01/05/10 17:50
01/05/10 17:50
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
the actual extra version is free wink

please donwload that to prevent errors wink

Re: variable does not operate [Re: Rei_Ayanami] #304200
01/05/10 18:03
01/05/10 18:03
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Banned.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1