Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (lijoyi2011), 1,034 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can`t run main.wdl, But it is main.c!!!!! #288137
09/04/09 12:41
09/04/09 12:41
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
Im worked at a shooter, but as I started it, it came up an warning;

"can`t run main.wdl"

But It is main.c (lite-c)!!!!
What the hack is happining??!!


I have know Gamestudio/A7 Commercial Edition 7.84
Re: can`t run main.wdl, But it is main.c!!!!! [Re: Blackchuck] #288144
09/04/09 13:16
09/04/09 13:16
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline
Member
boyax  Offline
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Maybe, there's also exist a main.wdl file in your work directory.. not sure..

Re: can`t run main.wdl, But it is main.c!!!!! [Re: boyax] #288152
09/04/09 14:38
09/04/09 14:38
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
In the properties of your level, did you add main.wdl as run script?


Click and join the 3dgs irc community!
Room: #3dgs
Re: can`t run main.wdl, But it is main.c!!!!! [Re: Joozey] #288163
09/04/09 15:15
09/04/09 15:15
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
No I have no it has exsist as "main.wdl", and I didn`t add an wdl or somthing like that.

Maby rhere is somthing with the script;

--------------------------------------------------------------------------------

///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////
var entity_speed = 3;
var movement_enabled = 0;
var dist_to_node;
var current_node = 1;
var angle_difference = 0;
var weapon_height;
var current_ammo = 20;
var players_ammo;
var currentGun = 1;
///////////////////////////////////////////////////////////////
VECTOR temp_angle;
VECTOR pos_node[3];
VECTOR trace_coords;
///////////////////////////////////////////////////////////////
STRING* hithole_tga = "hithole.tga";
STRING* target_mdl = "target.mdl";
///////////////////////////////////////////////////////////////
SOUND* bullet_wav = "bullet.wav";
SOUND* gotweapon2_wav = "gotweapon2.wav";
SOUND* nobullets_wav = "nobullets.wav";
SOUND* gotammo_wav = "gotammo.wav";
///////////////////////////////////////////////////////////////
function fire_bullets1();
function fire_bullets2();
function show_target();
function display_hithole();
///////////////////////////////////////////////////////////////

ENTITY* weapon1_ent =
{
type = "weapon1.mdl";
pan = 0;
x = 55;
y = -20;
z = -20;
pan = 2;

use_weapon_startup();
}



ENTITY* weapon2_ent =
{
type = "weapon2.mdl";
pan = 0;
x = 60;
y = 15;
z = -18;
pan = -3;

use_weapon_startup2();
}


void main()
{
shadow_stencil = 1;

level_load("level.wmb");
wait (1);
}


function move_target()
{
while(1)
{
if(movement_enabled)
{
entity_speed = minv(5, entity_speed + 0.5 * time_step);
c_move(my, vector(entity_speed * time_step, 0, 0), nullvector, IGNORE_PASSABLE | GLIDE);
vec_to_angle (my.pan, vec_diff (temp_angle, pos_node, my.x));
}

while (!player) {wait (1);}
while (1)
{
if ((c_scan(my.x, my.pan, vector(180, 90, 1000), IGNORE_ME) > 0) && (you == player))
{
wait (-2);// Make script later
}
if (vec_dist (player.x, my.x) < 150)
{
wait (-5);// Make script later
}
wait (1);
}
}
}



action enemy1()
{
move_target();
result = path_scan(me, my.x, my.pan, vector(360, 180, 1000));
if (result) {movement_enabled = 1;}
path_getnode (my, 1, pos_node, NULL);
vec_to_angle (my.pan, vec_diff (temp_angle, pos_node, my.x));
while(1)
{
dist_to_node = vec_dist(my.x, pos_node);
if(dist_to_node < 50)
{
current_node = path_nextnode(my, current_node, 1);
if (!current_node) {current_node = 1;}
path_getnode (my, current_node, pos_node, NULL);
}
wait(1);
}
}

action players_code()
{
var movement_speed = 10;
VECTOR temp;

player = my;
set (my, INVISIBLE);
while (1)
{
player.pan -= 7 * mouse_force.x * time_step;
camera.x = player.x;
camera.y = player.y;
camera.z = player.z + 50 + 1.1 * sin(my.skill44);
camera.pan = player.pan;
camera.tilt += 5 * mouse_force.y * time_step;
vec_set (temp.x, my.x);
temp.z -= 10000;
temp.z = -c_trace (my.x, temp.x, IGNORE_ME | IGNORE_PASSABLE | USE_BOX);
temp.x = movement_speed * (key_w - key_s) * time_step;
temp.y = movement_speed * (key_a - key_d) * 0.6 * time_step;
c_move (my, temp.x, nullvector, IGNORE_PASSABLE | GLIDE);
wait (1);
}
}

action gun()
{
ph_setgravity (vector(0, 0, -386));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 5, PH_BOX);
phent_setfriction (my, 99);
phent_setdamping (my, 20, 35);
phent_setelasticity (my, 45, 50);
while (!player) {wait (1);}
while (vec_dist (player.x, my.x) > 50)
{
wait (1);
}
players_ammo = 12;
snd_play (gotweapon2_wav, 80, 0);
set (my, PASSABLE);
set (my, INVISIBLE);
set (weapon1_ent, VISIBLE);
set (weapon2_ent, INVISIBLE);
wait (-1);
ent_remove (my);
}

action uzi()
{
ph_setgravity (vector(0, 0, -386));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 5, PH_BOX);
phent_setfriction (my, 99);
phent_setdamping (my, 20, 35);
phent_setelasticity (my, 45, 50);
while (!player) {wait (1);}
while (vec_dist (player.x, my.x) > 50)
{
wait (1);
}
players_ammo = 12;
snd_play (gotweapon2_wav, 80, 0);
set (my, PASSABLE);
set (my, INVISIBLE);
set (weapon2_ent, VISIBLE);
set (weapon1_ent, INVISIBLE);
wait (-1);
ent_remove (my);
}

function use_weapon_startup()
{
on_mouse_left = fire_bullets1;
proc_mode = PROC_LATE;
VECTOR player1_pos;
VECTOR player2_pos;
while (!player) {wait (1);}
while (1)
{
vec_set (player1_pos.x, player.x);
if (is (weapon2_ent, VISIBLE))
{
vec_set(trace_coords.x, vector(10000, 0, 0));
vec_rotate(trace_coords.x, camera.pan);
vec_add(trace_coords.x, camera.x);
if (c_trace(camera.x, trace_coords.x, IGNORE_ME | IGNORE_PASSABLE) > 0)
{
ent_create (target_mdl, target.x, show_target);
}
}
wait (1);
vec_set (player2_pos.x, player.x);
if (vec_dist (player1_pos.x, player2_pos.x) != 0)
{
weapon_height += 30 * time_step;
weapon2_ent.z += 0.03 * sin(weapon_height);
}
}
}

function use_weapon_startup2()
{
on_mouse_left = fire_bullets2;
proc_mode = PROC_LATE;
VECTOR player1_pos;
VECTOR player2_pos;
while (!player) {wait (1);}
while (1)
{
vec_set (player1_pos.x, player.x);
if (is (weapon2_ent, VISIBLE))
{
vec_set(trace_coords.x, vector(10000, 0, 0));
vec_rotate(trace_coords.x, camera.pan);
vec_add(trace_coords.x, camera.x);
if (c_trace(camera.x, trace_coords.x, IGNORE_ME | IGNORE_PASSABLE) > 0)
{
ent_create (target_mdl, target.x, show_target);
}
}
wait (1);
vec_set (player2_pos.x, player.x);
if (vec_dist (player1_pos.x, player2_pos.x) != 0)
{
weapon_height += 30 * time_step;
weapon2_ent.z += 0.03 * sin(weapon_height);
}
}
}

function show_target()
{
set (my, PASSABLE);
my.ambient = 100;
my.scale_x = minv (6, vec_dist (my.x, camera.x) / 500);
my.scale_y = my.scale_x;
my.scale_z = my.scale_x;
wait (1);
ent_remove (my);
}

function fire_bullets1()
{
if (is (weapon2_ent, INVISIBLE)) {return;}
if (current_ammo > 0)
{
c_trace(camera.x, trace_coords.x, IGNORE_ME | IGNORE_PASSABLE | ACTIVATE_SHOOT);
if (you == NULL)
{
ent_create (hithole_tga, target.x, display_hithole);
}
snd_play (bullet_wav, 100, 0);
current_ammo -= 1;
wait (-2);
}
else
{
snd_play (nobullets_wav, 100, 0);
}
}

function fire_bullets2()
{
if (is (weapon2_ent, INVISIBLE)) {return;}
if (current_ammo > 0)
{
c_trace(camera.x, trace_coords.x, IGNORE_ME | IGNORE_PASSABLE | ACTIVATE_SHOOT);
if (you == NULL)
{
ent_create (hithole_tga, target.x, display_hithole);
}
snd_play (bullet_wav, 100, 0);
current_ammo -= 1;
}
else
{
snd_play (nobullets_wav, 100, 0);
}
}
function display_hithole()
{
vec_to_angle (my.pan, normal);
vec_add(my.x, normal.x);
set (my, PASSABLE);
set (my, TRANSLUCENT);
my.ambient = 50;
my.roll = random(360);
my.scale_x = 0.5;
my.scale_y = my.scale_x;
wait (-20);
ent_remove (my);
}



action ammo_pack()
{
ph_setgravity (vector(0, 0, -386));
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 7, PH_BOX);
phent_setfriction (my, 99);
phent_setdamping (my, 20, 35);
phent_setelasticity (my, 45, 50);
while (!player) {wait (1);}
while (vec_dist (player.x, my.x) > 50)
{
wait (1);
}
snd_play (gotammo_wav, 80, 0);
set (my, PASSABLE);
set (my, INVISIBLE);
current_ammo += 12;
wait (-1);
ent_remove (my);
}

action wheel()
{
ph_setgravity (vector(0, 0, -386));
phent_settype (my, PH_RIGID, PH_CYLINDER);
phent_setmass (my, 15, PH_BOX);
phent_setfriction (my, 99);
phent_setdamping (my, 20, 35);
phent_setelasticity (my, 45, 50);
}

function toggle_guns_startup()
{
while (1)
{
if (key_1)
{
weapon1_ent.flags2 = VISIBLE;
weapon2_ent.flags2 = INVISIBLE;
currentGun = 1;
}
if (key_2)
{
weapon1_ent.flags2 = INVISIBLE;
weapon2_ent.flags2 = VISIBLE;
currentGun = 2;
}
if (currentGun == 1)
{
weapon1_ent.flags2 = VISIBLE;
weapon2_ent.flags2 = INVISIBLE;
}

if (currentGun == 2)
{
weapon1_ent.flags2 = INVISIBLE;
weapon2_ent.flags2 = VISIBLE;
}
wait (1);
}
}


I have know Gamestudio/A7 Commercial Edition 7.84
Re: can`t run main.wdl, But it is main.c!!!!! [Re: Blackchuck] #288267
09/05/09 03:18
09/05/09 03:18
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
It's not a big issue but next time try to post code as a code object...not so messy.
you should make sure it is saved as a "c" file first, don't assume it is "c"....you must type main.c, then save or try "main.c" with the quotations. You should check the folder later a view the details, if you see a main.wdl delete it. Go into med under file > map properties, load the main.c as the file to control your game.


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: can`t run main.wdl, But it is main.c!!!!! [Re: Nowherebrain] #288291
09/05/09 06:53
09/05/09 06:53
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
The problem can not be in the code because the script is not found at all. You attempt to start a "main.wdl" instead of "main.c". So you've given a wrong script name somewhere.

If you get that error in WED, its a wrong script name in the map properties. If in SED, the wrong script name is in the engine command line under Options.

You should also post the acklog.txt here, which contains the message about the reason of the problem.

Re: can`t run main.wdl, But it is main.c!!!!! [Re: Tobias] #288294
09/05/09 07:49
09/05/09 07:49
Joined: Aug 2008
Posts: 482
B
bart_the_13th Offline
Senior Member
bart_the_13th  Offline
Senior Member
B

Joined: Aug 2008
Posts: 482
Or maybe you didnt specify the code to run/publish in the configuration menu.
Or you should check the Use current file for test run option...


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