Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,655 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Entity error, but where? [Re: croman] #232081
10/19/08 10:24
10/19/08 10:24
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Originally Posted By: cerberi_croman
wait, i didn't understood you now.

1) when you comment this line: if(me == kruiscorrecter1){temp5 = kruisdraaier1;} - does it work or it gives you an error again?

It gives the same error.

Originally Posted By: cerberi_croman

2) when you comment this line: vec_for_vertex(temp,temp5,2);
- does it work or it gives you an error again?


It does work without error, but the entity is not attached to the place where it's belong (the vec_for_vertex script)

Re: Entity error, but where? [Re: n00bie] #232083
10/19/08 10:41
10/19/08 10:41
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
okay we found the problem and the problem is in that function which is obvious. from manual: vec_for_vertex (VECTOR* vector, ENTITY* entity, var number);

do you see what says in first parameter inside of brackets? it says vector and in your code there is entity and that's why you got an error.

you declared temp as ENTITY* temp; which is wrong, you must declare it as a vector: VECTOR temp; and then it will work.

Click to reveal..

VECTOR temp;
ENTITY* temp1;
ENTITY* temp2;
ENTITY* temp3;
ENTITY* temp4;
ENTITY* temp5 [4];

#define draaien skill1
#define draaien2 skill2
...

action act_kruis1()
{
kruis1 = me;
while(my)
{
wait(1);
if(me == kruis1){temp1 = vloer;}
vec_for_vertex(temp,temp1,340);

my.pan += my.draaien2 + vloer.draaien;
if(key_w == 1)
{
if(my.draaien2 > -2.5 - vloer.draaien)
{
my.draaien2 -= 0.04*time_step;
}
}
if(my.draaien2 < 0 && vloer.draaien > 0)
{
if(my.draaien2 < -2.5 - vloer.draaien)
{
my.draaien2 += 0.018*time_step;
}
}
if(key_s == 1)
{
if(my.draaien2 < 0)
{
my.draaien2 += 0.04*time_step;
}
}
my.roll = -kruiscorrecter1.y;
my.tilt = kruiscorrecter1.x;
my.x = temp.x;
my.y = temp.y;
my.z = temp.z;
wait(1);
}
}

action act_kruiscorrecter1()
{
kruiscorrecter1 = me;
while(my)
{
wait(1);
if(me == kruiscorrecter1){temp5 = kruisdraaier1;}
vec_for_vertex(temp,temp5,2);
my.x = temp.x;
my.y = temp.y;
my.z = temp.z;
wait(1);
}
}

action act_kruisdraaier1()
{
while(my)
{
wait(1);
my.pan += my.draaien2 + vloer.draaien - my.draaien;
if(key_w == 1)
{
if(my.draaien2 > -2.5 - vloer.draaien)
{
my.draaien2 -= 0.04*time_step;
}
}
if(my.draaien2 < 0 && vloer.draaien > 0)
{
if(my.draaien2 < -2.5 - vloer.draaien)
{
my.draaien2 += 0.018*time_step;
}
}
if(key_s == 1)
{
if(my.draaien2 < 0)
{
my.draaien2 += 0.04*time_step;
}
}
wait(1);
}
}




and if this dont work then use this

Click to reveal..

ENTITY* temp [11];
ENTITY* temp1;
ENTITY* temp2;
ENTITY* temp3;
ENTITY* temp4;
ENTITY* temp5 [4];

VECTOR temper; // new

#define draaien skill1
#define draaien2 skill2
...

action act_kruis1()
{
kruis1 = me;
while(my)
{
wait(1);
if(me == kruis1){temp1 = vloer;}
vec_for_vertex(temp,temp1,340);

my.pan += my.draaien2 + vloer.draaien;
if(key_w == 1)
{
if(my.draaien2 > -2.5 - vloer.draaien)
{
my.draaien2 -= 0.04*time_step;
}
}
if(my.draaien2 < 0 && vloer.draaien > 0)
{
if(my.draaien2 < -2.5 - vloer.draaien)
{
my.draaien2 += 0.018*time_step;
}
}
if(key_s == 1)
{
if(my.draaien2 < 0)
{
my.draaien2 += 0.04*time_step;
}
}
my.roll = -kruiscorrecter1.y;
my.tilt = kruiscorrecter1.x;
my.x = temp.x;
my.y = temp.y;
my.z = temp.z;
wait(1);
}
}

action act_kruiscorrecter1()
{
kruiscorrecter1 = me;
while(my)
{
wait(1);
if(me == kruiscorrecter1){temp5 = kruisdraaier1;}
vec_for_vertex(temper,temp5,2);
my.x = temper.x;
my.y = temper.y;
my.z = temper.z;
wait(1);
}
}

action act_kruisdraaier1()
{
while(my)
{
wait(1);
my.pan += my.draaien2 + vloer.draaien - my.draaien;
if(key_w == 1)
{
if(my.draaien2 > -2.5 - vloer.draaien)
{
my.draaien2 -= 0.04*time_step;
}
}
if(my.draaien2 < 0 && vloer.draaien > 0)
{
if(my.draaien2 < -2.5 - vloer.draaien)
{
my.draaien2 += 0.018*time_step;
}
}
if(key_s == 1)
{
if(my.draaien2 < 0)
{
my.draaien2 += 0.04*time_step;
}
}
wait(1);
}
}





Ubi bene, ibi Patria.
Re: Entity error, but where? [Re: croman] #232085
10/19/08 10:49
10/19/08 10:49
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
EDIT: with both solutions it gives still the same error.

Last edited by n00bie; 10/19/08 10:51.
Re: Entity error, but where? [Re: n00bie] #232086
10/19/08 10:51
10/19/08 10:51
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
then something is wrong with your temp1-5 entities. why have you declared ENTITY* temp[11] like this?



Ubi bene, ibi Patria.
Re: Entity error, but where? [Re: croman] #232087
10/19/08 10:53
10/19/08 10:53
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Originally Posted By: cerberi_croman
then something is wrong with your temp1-5 entities. why have you declared ENTITY* temp[11] like this?


Because different script files uses the temp entity. And only the movements script uses temp1-5.

Re: Entity error, but where? [Re: n00bie] #232088
10/19/08 10:56
10/19/08 10:56
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
i'm sorry but i dont see where the problem is. try commenting line by line to find where are the errors and then...i dont know, try to fix that somehow because i really dont see a solution, sorry.



Ubi bene, ibi Patria.
Page 2 of 2 1 2

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

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