including a c file to shooter wdl???? HELP

Posted By: ajs2

including a c file to shooter wdl???? HELP - 01/08/08 18:14


Below is code that adds a panel to a screen. It works!!
My problem is I can't add it to my project .wdl file.

I remove the main function
I have it saved in the template6/code folder with all the wdls.
I saved it as name.c

then i add include
include <script07_2.c>;
to my main wdl.

When i compile my main wdl it says it cannot open name.c

PLEASE ANYBODY HELP!!!


////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

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

BMAP* first_pcx = "first.pcx"; // my first bmap

PANEL* first_pan = // my first panel
{
pos_x = 0;
pos_y = 0;
layer = 1;
bmap = first_pcx;
flags = OVERLAY | VISIBLE;
}

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

function main()
{
video_mode = 7;
screen_color.blue = 150;
}
Posted By: NL_3DGS_n00b

Re: including a c file to shooter wdl???? HELP - 01/08/08 18:29

I think you cannot combine WDL and C that way...
Posted By: ajs2

Re: including a c file to shooter wdl???? HELP - 01/08/08 19:36

So how do i do it??

How do ppl add lite c to there progrmas so???????
Posted By: Trooper119

Re: including a c file to shooter wdl???? HELP - 01/08/08 22:56

I'm not sure but I haven't heard of C and lite-C being compatible, its like saying Python and Visual Basic should be able to be included within another, it simply can't be done, there two different to coexist. Unless lite-C is built with C which I'm not sure about. But in lite C I include files that I have written by things like Code:
 #include "menu.c" 

try that and see what happens. Note: When I do this, menu.c is in the file I'm calling the code I'm writing from.
Posted By: ajs2

Re: including a c file to shooter wdl???? HELP - 01/08/08 23:02

See the problem i have is i have started my project using the shooter template!! This calls wdl files.

I need to make text appear when I move beside an object.

I have code to to this but ppl are telling me i need to use this new "lite c" code!!!

This part of 3dgs is very confusing!!!
Posted By: Joozey

Re: including a c file to shooter wdl???? HELP - 01/08/08 23:37

You either start a lite-c project or a c-script project. You can not combine them. If you want your lite-c code to work, you need to start from scratch with lite-c using .h and .c files. Otherwise you have to convert your lite-c code to c-script and implement it in the template.
Posted By: ajs2

Re: including a c file to shooter wdl???? HELP - 01/10/08 13:44

DO i Have to convert my lite-c code manully to c-script??
All the tutorials i find are in lite_C!!!
© 2023 lite-C Forums