0 registered members (),
16,232
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
converting to lite c
#348029
11/21/10 23:47
11/21/10 23:47
|
Joined: Jan 2010
Posts: 145
Doc_Savage
OP
Member
|
OP
Member
Joined: Jan 2010
Posts: 145
|
im trying to convert from c-script. is there any tool or guide that can help me with this? ive looked at "migrating to lite c" but it dosent tell as much as id hoped. i keep having a problem with:
action attach_weapon()
{
set(my, PASSABLE);
proc_mode = PROC_LATE;
while (player != null) { wait(1); } {
vec_for_vertex(temp.x,player,125); //hand palm base
vec_for_vertex(temp2.x,player,130); //hand palm tip
vec_set(my.x,temp.x);
vec_diff(temp.x,temp2.x,temp.x);
vec_to_angle(temp.pan,temp.x);
vec_set(my.pan,temp.pan);
wait(1);
}
}
it says "while (player != null) { wait(1); } {while (player != null) { wait(1); } {" is an undeclared identifier. what does that even mean? lol. so can anyone help me? ive heard so much about lite c i want to use it so bad.
Do not concern yourself with my race, personality or origin. find my record in the pits, and then make your wager.
|
|
|
Re: converting to lite c
[Re: MrGuest]
#348035
11/22/10 02:11
11/22/10 02:11
|
Joined: Jan 2010
Posts: 145
Doc_Savage
OP
Member
|
OP
Member
Joined: Jan 2010
Posts: 145
|
omg nice, ok now ive got a problem with this line:
vec_for_vertex(temp.x,player,125); //hand palm base
says x isnt a member of function. darn i wish i knew this better
Last edited by Doc_Savage; 11/22/10 02:17.
Do not concern yourself with my race, personality or origin. find my record in the pits, and then make your wager.
|
|
|
Re: converting to lite c
[Re: Doc_Savage]
#348036
11/22/10 04:07
11/22/10 04:07
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
Try to define temp as vector, not as var! And you don´t need to write temp.x... Just do it like this: vec_for_vertex(temp,player,125); //hand palm base Edit: This one compiles, but I haven´t tested it:
action attach_weapon()
{
VECTOR temp;
VECTOR temp2;
set(my, PASSABLE);
proc_mode = PROC_LATE;
while (player != NULL) { wait(1); } {
vec_for_vertex(temp,player,125); //hand palm base
vec_for_vertex(temp2,player,130); //hand palm tip
vec_set(my.x,temp);
vec_diff(temp,temp2,temp);
vec_to_angle(temp,temp);
vec_set(my.pan,temp);
wait(1);
}
}
Hope it helps...
Last edited by fogman; 11/22/10 04:12.
no science involved
|
|
|
Re: converting to lite c
[Re: fogman]
#348046
11/22/10 07:15
11/22/10 07:15
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
Try this one (not tested, but without errors):
action attach_weapon()
{
VECTOR base_vec;
VECTOR tip_vec;
ANGLE base_ang;
set(my,PASSABLE);
proc_mode = PROC_LATE;
while (player != NULL) { wait(1); }
while(1)
{
vec_for_vertex(base_vec.x,player,125); //hand palm base
vec_for_vertex(tip_vec.x,player,130); //hand palm tip
vec_set(my.x,base_vec.x);
vec_diff(base_vec.x,tip_vec.x,base_vec.x);
vec_to_angle(base_ang.pan,base_vec.x);
vec_set(my.pan,base_ang.pan);
wait(1);
}
}
|
|
|
Re: converting to lite c
[Re: 3run]
#348187
11/23/10 17:00
11/23/10 17:00
|
Joined: Jan 2010
Posts: 145
Doc_Savage
OP
Member
|
OP
Member
Joined: Jan 2010
Posts: 145
|
wow you guys are good. i wish i could convert this whole script real quick, any tool for doing that? some things i need to change i REALLY dont know what to change them to. its real annoying.
also, is gameplay gonna be different? like will things still work the same as it did in cscript?
Last edited by Doc_Savage; 11/23/10 17:42.
Do not concern yourself with my race, personality or origin. find my record in the pits, and then make your wager.
|
|
|
Re: converting to lite c
[Re: 3run]
#348332
11/25/10 05:00
11/25/10 05:00
|
Joined: Jan 2010
Posts: 145
Doc_Savage
OP
Member
|
OP
Member
Joined: Jan 2010
Posts: 145
|
ill do just that. can i pm you if i hit a snag? i dont want to clutter up these boards with my whining lool. and thank you.
Do not concern yourself with my race, personality or origin. find my record in the pits, and then make your wager.
|
|
|
|