0 registered members (),
17,416
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Entity error, but where?
#232065
10/19/08 09:35
10/19/08 09:35
|
Joined: Feb 2007
Posts: 53
n00bie
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2007
Posts: 53
|
Hi,
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
Serious User
|
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
n00bie
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2007
Posts: 53
|
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
Serious User
|
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 
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
n00bie
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2007
Posts: 53
|
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. 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
Serious User
|
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
n00bie
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2007
Posts: 53
|
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
Serious User
|
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
n00bie
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2007
Posts: 53
|
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
Serious User
|
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.
|
|
|
|