Linking Scripts

Posted By: log2

Linking Scripts - 09/19/08 02:13

Ok, I'm trying to link my two scripts, I have a Level1.wdl, and a menu.wdl, now I also have a statement
Code:
#include "scripts\menu.wdl"
Now as you can guess, my menu.wdl is in a scripts folder, now when I run the Level1.wdl, it looks like this:
Code:
*/
function main ()
{
	video_switch(8 ,32, 2);
	level_load("Level1.wmb");
	wait(3);
	mouse_spot.x = (bmap_width(cursor) / 2);
	mouse_spot.y = bmap_height(cursor) / 2;
	mouse_mode = 2;
	mouse_map = cursor;
	set_menu();
	fcn_menu();
now fcn_menu, and set_menu are in the menu.wdl, however, it gives me an error when I run it, something along the lines of:
Quote:
nonexistant/empty function
can't quite see it, because it still runs, but obviously not like it's supposed to.


So in other words, my functions aren't running now that I've put my menu into another script.

Any help is appreciated, thanks
Posted By: DJBMASTER

Re: Linking Scripts - 09/19/08 02:36

you are using the wrong syntax. #include is lite-c, but you are using c-script because the filename is .wdl.

try changing
Code:
#include "scripts\menu.wdl" 

to
Code:
include "scripts\menu.wdl";

Posted By: log2

Re: Linking Scripts - 09/19/08 02:39

ah perfect thanks a lot man, also just an FYI I also needed to double \ to cancel out, but thanks a bunch
© 2024 lite-C Forums