|
|
|
1 registered members (Grant),
999
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Header Problem
#253241
02/23/09 17:35
02/23/09 17:35
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
Hi
I have a problem with the lite-C header:
I define a function within the header an then use it in the script. But the script doesnt realize the functions, defines,etc. I have wirtten into the header, whats wrong?
Thanks
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
Re: Header Problem
[Re: MPQ]
#253245
02/23/09 17:56
02/23/09 17:56
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Give us a look at some of the header, and the code you used to include it please. If you are coming over from c-script, remember lite-c uses "#include", not just "include" like c-script
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Header Problem
[Re: EvilSOB]
#253253
02/23/09 18:17
02/23/09 18:17
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
its difficult to show some code examples, because it is divided in many parts.
I didnt forget "#include"
Is there some spezial code to initialize a header I forgot?
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
Re: Header Problem
[Re: MPQ]
#253279
02/23/09 20:10
02/23/09 20:10
|
Joined: Nov 2008
Posts: 354 saeculum II
MPQ
OP
Senior Member
|
OP
Senior Member
Joined: Nov 2008
Posts: 354
saeculum II
|
whats an "empty prototype"?
edit: i solved the header problem: I first included the scripts instead of the headers^^
Last edited by MPQ; 02/23/09 20:12.
new project in early stage...
Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
|
|
|
Re: Header Problem
[Re: MPQ]
#253332
02/24/09 03:45
02/24/09 03:45
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Hehe, easy to do... An "empty prototype" is a function that has been declared, but contains no code; Example
function move_me(); //currently an invalid prototype
function move_you(); //also currently an invalid prototype
...
... various stuff
...
function move_others()
{
move_you(); //can use move_you cause it gets filled later
move_me(); //CANT use move_me, will crash running this line
}
...
...
...
function move_you() //makes move_you NO-LONGER an "empty prototype"
{
you.x += 5;
//do whatever
}
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|
|
|
|