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
0 registered members (), 18,580 guests, and 5 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 1 of 2 1 2
Entity error, but where? #232065
10/19/08 09:35
10/19/08 09:35
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Hi,

Code:
ENTITY* temp [11];
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);
	}
}


The engine gives this error while running this script:



Where is the problem?

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

Joined: Nov 2007
Posts: 1,032
Croatia
maybe in vec_for_vertex function. you need to put vector, not entity in first place in function and you've put entity and that's why it gives you such error



Ubi bene, ibi Patria.
Re: Entity error, but where? [Re: croman] #232068
10/19/08 09:42
10/19/08 09:42
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
maybe in vec_for_vertex function. you need to put vector, not entity in first place in function and you've put entity and that's why it gives you such error


I'm sorry but I don't understand you.

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

Joined: Nov 2007
Posts: 1,032
Croatia
in vec_for_vertex(temp, temp5, 2); temp is not vector but an entity. maybe that gives you an error.

or try instead of this if(me == kruiscorrecter1) to put just if(me)


i hope you understood me this time smile



Ubi bene, ibi Patria.
Re: Entity error, but where? [Re: croman] #232075
10/19/08 10:10
10/19/08 10:10
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
in vec_for_vertex(temp, temp5, 2); temp is not vector but an entity. maybe that gives you an error.

I've made a temp Vector, but i've got still the same error.

Originally Posted By: cerberi_croman

or try instead of this if(me == kruiscorrecter1) to put just if(me)

This won't work.

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

Joined: Nov 2007
Posts: 1,032
Croatia
this second thing will work, either if(me) or if(kruiscorrecter1)



Ubi bene, ibi Patria.
Re: Entity error, but where? [Re: croman] #232077
10/19/08 10:16
10/19/08 10:16
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
this second thing will work, either if(me) or if(kruiscorrecter1)


It's now "if(me)" but I've got still that error.

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

Joined: Nov 2007
Posts: 1,032
Croatia
try commenting out this line: if(me == kruiscorrecter1){temp5 = kruisdraaier1;}
and tell me if you still get the same error



Ubi bene, ibi Patria.
Re: Entity error, but where? [Re: croman] #232079
10/19/08 10:19
10/19/08 10:19
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
try commenting out this line: if(me == kruiscorrecter1){temp5 = kruisdraaier1;}
and tell me if you still get the same error


Yes, and when i commenting the vec_for_vertexes uit it does'nt. So it are both vec_for_vertexes...

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

Joined: Nov 2007
Posts: 1,032
Croatia
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?

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



Ubi bene, ibi Patria.
Page 1 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