Errors :( big mess

Posted By: Blackspace

Errors :( big mess - 05/21/09 21:00

hi

I started my pc again afther a month and I encounter the error W1301. confused I looked arround the forum and found some other people had the same problem. But there wasn't a solution explained. frown

I made a new map
created a cube
builded
saved
runned error can't open test9.wdl confused

Everything is in the same folder. So thats not the problem.

I think the problem is with the line of the running line : test9.wmb -nx 30 1.c 1.c 1.c 1.wmb
so I changed into : test9.c -nx 30 1.c 1.c 1.c test9.wmb and it worked.. smile
but...
now I get problems with my scripts.. They cannot be started and when you run them in the map editor they are ignored. cry


Can some one please explain me what's wrong? frown Never had this before..

Is there some repair function on 3dgamestudio?
Posted By: KiwiBoy

Re: Errors :( big mess - 05/21/09 23:07

Take away everything else except for test9.wmb -nx 30 but change .wmb for .c
Thats what I think smile
Its suppossed to run scripts when you 'run' and the scripts call up the wmb file.
also add -diag for debugging purposes. This produces a text file which you can submit for bugs or error checking on some occassions.
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 11:35

It worked smile but there is one problem...
The debugg list says there is a error with my video_mode? frown

// test9.wdl
var video_mode = 7; //revolutie
var video_depth = 16; //bit

function main()
{
level_load("test9.wmb");
wait(2);
}

error: syntax error: can't convert GETPVALUE:FIXED:FIXED
<var mode = video_mode;>

I think its something small but I cant find it xD
Posted By: croman

Re: Errors :( big mess - 05/22/09 11:47

function main()
{
video_mode = 7; //revolutie
video_depth = 16; //bit
level_load("test9.wmb");
wait(2);
}

try it this way
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 11:52

Thanks both it worked ^.^
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 12:42

a bit cheered to early frown It seems that more var have the same problem. frown

When I create a var it doesn't "realy" creating a var.

example my old script worked:
var video_mode = 7;
var video_depth = 16;
var move_vec[3] = 0,0,0;
function main()
{
level_load("TLlevel1.wmb");
wait(2);
}
var idle_percent = 0; //
var walk_percent = 0; // "

var temptilt = 0; //turn the camera
ecc...
This scrip is still working
but when I copy this script to new game all var are getting an error: MAIN undenclared indentifier. frown I found out all var where black then gray.
My new script that doesn't work:
function main()
{
video_mode = 9;
video_depth = 16;
level_load("test9.wmb");
wait(2);
}
var = idle_percent = 0;
var = walk_percent = 0;
var = move_vec[3] = 0,0,0;
ecc...
It doesn't change if you put the var in the main function. frown
Posted By: croman

Re: Errors :( big mess - 05/22/09 13:20

wrong!
var = idle_percent = 0;

correct!
var idle_percent = 0;
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 14:26

I feel stupid by that mistake xD

but when I correct it still gives an error: MAIN undenclared indentifier about
var move_vec[3] = 0,0,0; When I change it to var move_vec[3] = {0,0,0}; the problem start again when the var is called.
In : move_vec[0] = (key_w - key_s)*3*time;
move_vec[1] = (key_q - key_e)*2*time;
player.pan += (key_a - key_d)*4*time;
ent_move(move_vec,NULLVECTOR);
Posted By: croman

Re: Errors :( big mess - 05/22/09 14:42

instead of this:
var move_vec[3] = 0,0,0;

try this:
VECTOR move_vec;
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 14:49

no luck frown
Posted By: KiwiBoy

Re: Errors :( big mess - 05/22/09 19:11

You really need to upload your entire code, I suspect you have many syntax errors thats causing all your grief.
E.g. above you have ent_move. old C-script move system when you should be using c move.
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 19:31

this is my full script

// test9.wdl
var idle_percent = 0;
var walk_percent = 0;
var video_mode = 9;
var video_depth = 16;
var temptilt = 0;
var move_vec[3] = 0,0,0;




function main()
{

video_mode = 9;
video_depth = 16;
level_load("test9.wmb");

wait(2);
}


action player_move()
{
player = me;
camera.genius = player;

wait(1);

while (1)
{
move_vec[0] = (key_w - key_s)*3*time;
move_vec[1] = (key_q - key_e)*2*time;
player.pan += (key_a - key_d)*4*time;
ent_move(move_vec,NULLVECTOR);



if (move_vec[0]==0&& move_vec[1]==0)
{
idle_percent = (idle_percent +5*time)%100; ent_animate(me,"idle",idle_percent,ANM_CYCLE);
}
else
{
walk_percent = (walk_percent+sign(move_vec[0])*5*time)%100;
ent_animate(player,"walk",walk_percent,ANM_CYCLE);

}

// camera updates
vec_set (Camera.x,player.x);
camera.z += 27;
camera.pan = player.pan;
temptilt += (key_pgup - key_pgdn)*4*time;
if (key_home ==1) //reset camera tilt
{
temptilt =0;
}
if (temptilt > 75)
{
temptilt = 75;
}
else
{
if (temptilt <-75)
{
temptilt =-75;
}
}
camera.tilt =0+temptilt;

wait(1);
}
}

I created this script by following an tutorial of creating a fps.
Posted By: Phonech

Re: Errors :( big mess - 05/22/09 19:34

Try...

Code:
VECTOR move_vec;

move_vec.x = (key_q - key_e)*2*time;
move_vec.y = (key_q - key_e)*2*time;
player.pan += (key_a - key_d)*4*time;
ent_move(move_vec,NULLVECTOR);


...but I'm not sure. You should give lite-c a try^^
Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 20:14

no luck frown
Posted By: Xarthor

Re: Errors :( big mess - 05/22/09 20:26

You are missing the movement mode.
If you have the latest A6 or any A7 edition replace this line:
Code:
ent_move(move_vec,NULLVECTOR);

with this one:
Code:
c_move(my,move_vec,nullvector,IGNORE_PASSABLE);

Posted By: Blackspace

Re: Errors :( big mess - 05/22/09 21:09

hmm the problem isn't there :p or didn't had that problem jet.

wed gives the error that there is something with the: var move_vec[3] = 0,0,0;

error in "MAIN"line syntax error
<
var move_vec[3] = 0,0,0;
>
Posted By: MrGuest

Re: Errors :( big mess - 05/23/09 10:15

change it to
Code:
var move_vec[3] = {0,0,0};

Posted By: Blackspace

Re: Errors :( big mess - 05/23/09 14:47

I finaly found the problem why there where so many problems. smile
And its a beginner mistake. :p I did know that there are 2 diffrence languages C and C-lite.
But didn't know the diffrence between them. So I followed a tutorial but I didn't know it was C.

My script isn't working because I saved my script as a lite-C.

I want to thank you all of your awnsers and helping. smile
© 2024 lite-C Forums