Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,549 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Syntax error #250338
02/07/09 13:20
02/07/09 13:20
Joined: Aug 2008
Posts: 105
Nisirupia
M
MMO Offline OP
Member
MMO  Offline OP
Member
M

Joined: Aug 2008
Posts: 105
Nisirupia
I build ed a small lv to check the shaders of 3dgs commercial version (i use the trial)
i added the water then mel i assigned a action to the water and i clicked build
i get 3 syntax error


////////////////////////////////////////////////////////////////////////
// A6 "Walk Thru" Project wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio7\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio7\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio7\\templates\\images"; // Path to template image subdirectory
path "C:\\Program Files\\GStudio7\\templates\\sounds"; // Path to template sound subdirectory
path "C:\\Program Files\\GStudio7\\templates\\models"; // Path to template model subdirectory

/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <incercare7.WMB>; // give file names in angular brackets

////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <plSelect.wdl>;
include <cameraTarget.wdl>;
include <miscInput01.wdl>;
include <plBipedInput01.wdl>;
include <bipedPhy01.wdl>;
include <bipedAnim01.wdl>;
include <bipedSnd01.wdl>;
include <plBiped01.wdl>;
include <cameraSelect.wdl>;
include <camera1stPerson01.wdl>;
include <default.fx>;
include <mtlFX.wdl>;





/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
function main()
{
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);

wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

//+++ load starting values


// un-freeze the game
freeze_mode = 0;

// save start of game here
wait(6); // allow time for functions that wait for "gid01_level_loaded" to load
file_delete("start0.SAV"); // remove any old savefile
wait(1);
if( game_save("start",0,SV_ALL) <= 0)
{
diag("\nWARNING! main - Cannot save 'start' of level (ignore on restarts).");
}
else
{
diag("\nWDL: main - Game 'start' saved.");
}


// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
freeze_mode = 1; // pause the game
while(gid01_level_state != gid01_level_loaded) { wait(1); }
freeze_mode = 0; // resume the game
}
wait(1);
}

}


// Desc: this is the function used to restart the game.
function main_restart_game()
{
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// freeze the game
freeze_mode = 1;

if( game_load("start",0) <= 0)
{
diag("\nWARNING! main_restart_game - Cannot load 'start' of level.");
}
else
{
diag("\nWDL: main_restart_game - Game 'start' loaded");
}

// un-freeze the game
freeze_mode = 0;
}


// Desc: this is the function used to quit the game.
function main_quit()
{
//+++ // save global skills & strings
exit;
}

/////////////////////////////////////////////////////////////////
// The following definitions are for the pro edition window composer
// to define the start and exit window of the application.
WINDOW WINSTART
{
TITLE "3D GameStudio";
SIZE 480,320;
MODE IMAGE; //STANDARD;
BG_COLOR RGB(240,240,240);
FRAME FTYP1,0,0,480,320;
// BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24;
BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24;
TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280;
}

/* no exit window at all..
WINDOW WINEND
{
TITLE "Finished";
SIZE 540,320;
MODE STANDARD;
BG_COLOR RGB(0,0,0);
TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;

SET FONT "",RGB(0,255,255);
TEXT "Any key to exit",10,270;
}*/


/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;

Re: Syntax error [Re: MMO] #250339
02/07/09 13:21
02/07/09 13:21
Joined: Aug 2008
Posts: 105
Nisirupia
M
MMO Offline OP
Member
MMO  Offline OP
Member
M

Joined: Aug 2008
Posts: 105
Nisirupia
now i get 2 errors :L

Re: Syntax error [Re: MMO] #250340
02/07/09 13:24
02/07/09 13:24
Joined: Aug 2008
Posts: 105
Nisirupia
M
MMO Offline OP
Member
MMO  Offline OP
Member
M

Joined: Aug 2008
Posts: 105
Nisirupia
bump

Re: Syntax error [Re: MMO] #250346
02/07/09 14:03
02/07/09 14:03
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
"#endif" is a C statement. It does not work in WDL and you can not include an ".fx" file in your script anyway.

Re: Syntax error [Re: Tobias] #250347
02/07/09 14:10
02/07/09 14:10
Joined: Aug 2008
Posts: 105
Nisirupia
M
MMO Offline OP
Member
MMO  Offline OP
Member
M

Joined: Aug 2008
Posts: 105
Nisirupia
tnx for answering
so you say that i can't get it working in sed?
can u guide me or correct the script where is wrong?

Re: Syntax error [Re: MMO] #250355
02/07/09 14:32
02/07/09 14:32
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
include <default.fx>; -> delete this line

(and dopnt bump 4 minute old topics, people find this annoying.)


3333333333
Re: Syntax error [Re: Quad] #250361
02/07/09 14:48
02/07/09 14:48
Joined: Aug 2008
Posts: 105
Nisirupia
M
MMO Offline OP
Member
MMO  Offline OP
Member
M

Joined: Aug 2008
Posts: 105
Nisirupia
tnx it worked now i get another error but it lets me enter in the test lv the only problem is that the shader diden't worked
this is the error
invalid arguments in fx_water_env:BMAP

Re: Syntax error [Re: MMO] #250581
02/08/09 20:38
02/08/09 20:38
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you're mixing languages =).

Re: Syntax error [Re: Joey] #277434
07/09/09 09:16
07/09/09 09:16
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
BMAP,bmap
lite-c,c-script

Last edited by Nowherebrain; 07/09/09 09:16.

Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Syntax error [Re: Nowherebrain] #277921
07/11/09 13:17
07/11/09 13:17
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
Nowherebrain, I thought C-script was not case sensitive? So wouldn't the difference be the *, as in:

BMAP* my_bmap = "picture.bmp"; (Lite-C)
bmap my_bmap = "picture.bmp"; (C-script)

?

If that's true, you could actually use: "BmAp", if you were very bored, lol. But I don't know jack about C-script...

MMO, I'm assuming you're new to 3DGS and maybe programming in general? If so, I'd personally recommend you learn Lite-C, rather than fooling with C-script, but some may beg to differ. Lite-C just always seemed more logical to me, maybe since I learned some C and C++ beforehand. Plus, I think the developers say it's more powerful and flexible. Just my 2 cents. smile

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

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