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
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 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
Page 2 of 2 1 2
Re: Errors :( big mess [Re: Blackspace] #267257
05/22/09 19:11
05/22/09 19:11
Joined: Apr 2009
Posts: 298
Southern Oceans
KiwiBoy Offline
Member
KiwiBoy  Offline
Member

Joined: Apr 2009
Posts: 298
Southern Oceans
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.


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage
Re: Errors :( big mess [Re: KiwiBoy] #267259
05/22/09 19:31
05/22/09 19:31
Joined: Mar 2009
Posts: 21
B
Blackspace Offline OP
Newbie
Blackspace  Offline OP
Newbie
B

Joined: Mar 2009
Posts: 21
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.

Re: Errors :( big mess [Re: Blackspace] #267260
05/22/09 19:34
05/22/09 19:34
Joined: Feb 2009
Posts: 38
Germany
P
Phonech Offline
Newbie
Phonech  Offline
Newbie
P

Joined: Feb 2009
Posts: 38
Germany
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^^

Re: Errors :( big mess [Re: Phonech] #267264
05/22/09 20:14
05/22/09 20:14
Joined: Mar 2009
Posts: 21
B
Blackspace Offline OP
Newbie
Blackspace  Offline OP
Newbie
B

Joined: Mar 2009
Posts: 21
no luck frown

Re: Errors :( big mess [Re: Blackspace] #267266
05/22/09 20:26
05/22/09 20:26
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
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);


Re: Errors :( big mess [Re: Xarthor] #267270
05/22/09 21:09
05/22/09 21:09
Joined: Mar 2009
Posts: 21
B
Blackspace Offline OP
Newbie
Blackspace  Offline OP
Newbie
B

Joined: Mar 2009
Posts: 21
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;
>

Re: Errors :( big mess [Re: Blackspace] #267336
05/23/09 10:15
05/23/09 10:15
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
change it to
Code:
var move_vec[3] = {0,0,0};


Re: Errors :( big mess [Re: MrGuest] #267377
05/23/09 14:47
05/23/09 14:47
Joined: Mar 2009
Posts: 21
B
Blackspace Offline OP
Newbie
Blackspace  Offline OP
Newbie
B

Joined: Mar 2009
Posts: 21
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

Page 2 of 2 1 2

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