Class And Integer


mr.miyagi

Member
Joined
Nov 10, 2004
Messages
192
Age
46
Location
Europe
Hey
Is it possible to make a class in fenix like in c#/Java insted of having everything in one HUGE file. :unsure:
How do you make Integers? :unsure:

I know you can do it like this:

Global
countA;
countB;

Process Test();
Begin
countA = 5;
icountB = 5;
End;

But I dont want them to be global, I want them only in the process.
I tried:

process Test();
Begin
int countA = 5;
int countB = 5;
End;

but it dosent work.
 
Don`t know what you mean with class, but you can include other source files and call processes of these sources, but I don`t know exactly how, and it may be buggy (atleast what I heard from devlkore`s shooter game Straight To Hell).

This is how you make variables just for a certain process:

Code:
process blabla();
 private
   int countA=5;
   int countB=5;
 begin
   ...
  end;
 
Quiest posted on Aug 25 2005 at 11:55 PM said:
you can include other source files and call processes of these sources, but I don`t know exactly how, and it may be buggy (atleast what I heard from devlkore`s shooter game Straight To Hell).

Yups thats what I mean.hmmm ok :huh:
but if you have all code in one big file, then the file will have 1000000 lines of code, and thats not good. :(


Quiest posted on Aug 25 2005 at 11:55 PM said:
This is how you make variables just for a certain process:

Code:
process blabla();
 private
   int countA=5;
   int countB=5;
 begin
   ...
  end;

oh thats the way how to do it
cool thanks. :)
 
Last edited by a moderator:
To add on what Quiest said, including files is possible and works pretty good, including files works like this:

Code:
[globals/processes]
include "extra.inc";
[more processes]

just watch out not to declare it within a process or anything, you'll be fine. Another thing, you can declare globals in included files, just start with a global section as you would in the main file. A problem that can come up however is that Fenix has some trouble with the order in which you declare things, say, you have this:

Code:
// MAIN FILE
program omg;

include "number1.inc";
include "number2.inc";

// NUMBER1.INC

process wtf()

begin
  omfg = 1;
end

// NUMBER2.INC

global
omfg;

You use a global before you have declared it, and it floods you with unreadable Spanish HOLA ERORA ESPANOLA PROCESSO 234 errors. Not good.
 
Moogle posted on Aug 26 2005 at 01:57 PM said:
To add on what Quiest said, including files is possible and works pretty good, including files works like this:

Code:
[globals/processes]
include "extra.inc";
[more processes]

just watch out not to declare it within a process or anything, you'll be fine. Another thing, you can declare globals in included files, just start with a global section as you would in the main file. A problem that can come up however is that Fenix has some trouble with the order in which you declare things, say, you have this:

Code:
// MAIN FILE
program omg;

include "number1.inc";
include "number2.inc";

// NUMBER1.INC

process wtf()

begin
  omfg = 1;
end

// NUMBER2.INC

global
omfg;

You use a global before you have declared it, and it floods you with unreadable Spanish HOLA ERORA ESPANOLA PROCESSO 234 errors. Not good.


Cool. thanks :) I will try that
 
Last edited by a moderator:
Back
Top