Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Linking Scripts #228383
09/19/08 02:13
09/19/08 02:13
Joined: Sep 2008
Posts: 29
L
log2 Offline OP
Newbie
log2  Offline OP
Newbie
L

Joined: Sep 2008
Posts: 29
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

Re: Linking Scripts [Re: log2] #228384
09/19/08 02:36
09/19/08 02:36
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
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";


Re: Linking Scripts [Re: DJBMASTER] #228385
09/19/08 02:39
09/19/08 02:39
Joined: Sep 2008
Posts: 29
L
log2 Offline OP
Newbie
log2  Offline OP
Newbie
L

Joined: Sep 2008
Posts: 29
ah perfect thanks a lot man, also just an FYI I also needed to double \ to cancel out, but thanks a bunch


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

Gamestudio download | chip programmers | 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