Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
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
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 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
vec_for_screen / vec_to_screen #301942
12/15/09 15:26
12/15/09 15:26
Joined: Mar 2007
Posts: 1,852
A
alpha_strike Offline OP
Serious User
alpha_strike  Offline OP
Serious User
A

Joined: Mar 2007
Posts: 1,852
Sorry, I feel like a bloody beginner, think I have a total black out
...

vector temp;
temp.x=500; temp.y=500; temp.z=500;
vec_for_screen(temp,camera);

This codes result is an error 1515 (or 1513)
invalid arguments...

what the hell is wrong

Re: vec_for_screen / vec_to_screen [Re: alpha_strike] #301950
12/15/09 15:51
12/15/09 15:51
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

the vector temp is empty.
try putting a value of zero
VECTOR temp = {x=0; y=0;z=0;}



Last edited by Ottawa; 12/15/09 16:06.

Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: vec_for_screen / vec_to_screen [Re: Ottawa] #301953
12/15/09 16:03
12/15/09 16:03
Joined: Apr 2009
Posts: 33
Germany
B
Bunsen Offline
Newbie
Bunsen  Offline
Newbie
B

Joined: Apr 2009
Posts: 33
Germany
'vector' is not a data type but a function (or macro):

Try:

VECTOR temp;
...

or

vec_for_screen(vector(500,500,500), camera);

Re: vec_for_screen / vec_to_screen [Re: Ottawa] #301956
12/15/09 16:05
12/15/09 16:05
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
VECTOR has to be in capitals (nur um sicherzugehen, falls du das nicht eh schon hast).

Edit: too slow...

Last edited by Superku; 12/15/09 16:06.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
PROBLEM vec_for_screen [Re: Superku] #302008
12/15/09 21:51
12/15/09 21:51
Joined: Mar 2007
Posts: 1,852
A
alpha_strike Offline OP
Serious User
alpha_strike  Offline OP
Serious User
A

Joined: Mar 2007
Posts: 1,852
Sorry fellows, I am going crazy. Totally blacked out.
Some bros, please have a look...
This is some code. I just want to try out vec_for_screen.
I load a level, with existing camera... and always get a crash.
What is wrong with this lines???!?!?!
E1515 invalid arguments in start_the_menu


VECTOR* testvec = {x=500; y=500;z=500;}
function start_the_menu()
{
level_load("leer_lev.wmb");

vec_set(camera,vector(0,0,0));
camera.pan=100;
camera.tilt=5;

wait(2);


vec_for_screen(testvec,camera);

}





Last edited by alpha_strike; 12/15/09 21:52.
Re: PROBLEM vec_for_screen [Re: alpha_strike] #302012
12/15/09 22:14
12/15/09 22:14
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl

vec_set(camera.x,vector(0,0,0));

dont forget the .x ?


"empty"
Re: PROBLEM vec_for_screen [Re: flits] #302014
12/15/09 22:32
12/15/09 22:32
Joined: Nov 2009
Posts: 43
Turkiye
M
Machera Offline
Newbie
Machera  Offline
Newbie
M

Joined: Nov 2009
Posts: 43
Turkiye
maybe testvec values are not invalid on this contdition. try another values.

Last edited by Machera; 12/15/09 22:33.
Re: PROBLEM vec_for_screen [Re: flits] #302015
12/15/09 22:38
12/15/09 22:38
Joined: Mar 2007
Posts: 1,852
A
alpha_strike Offline OP
Serious User
alpha_strike  Offline OP
Serious User
A

Joined: Mar 2007
Posts: 1,852
bro, let me tell you some shit.
I swear to god, that I use vec_for_screen nearly since 2002, my first game war train. Uncountable times.
O.k., since I changed from C to Lite, there are several problems. But I solved them...
This day I was near fictional suicide... I checked out hundreds of combinations and always thought that I still not clearly understand the new usage of vectors.
BUT THAT I MADE THIS MISTAKE vec_set...
bro - god bless you - thank you - this day comes to a good end.
edit.Thank and hail to all bros who take the time and read my shit.

Last edited by alpha_strike; 12/15/09 22:39.
Re: PROBLEM vec_for_screen [Re: alpha_strike] #302016
12/15/09 22:45
12/15/09 22:45
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
tip: in lite-c if you pass a varible or one component of vec instead of a complete vector(i.e camera.x,my.x, my.skill30) variables following this variable are considered as y and z values of that vector you meant.

i.e if you use camera.x lite-c gets the camrea.y and z automatically.

if you use skills it will use following skills as vector's component.
i.e:

VECTOR temp_vec;
temp_vec.x = 10;
temp_vec.y = 12;
temp_vec.z = 35;
vec_set(my.skill45,temp_vec);
//lines above will make your skill45 10, skill46 12 and skill47 35.

---

in same way this sometimes result in diffrent sutiations.
like panels only have pos_x and pos_y, there is no z pos.

if you call vec_set(panel1.pos_x,panel2.pos_x);
it will set pos_x and pos_y correctly, but it will also make panel1's flags same as panel2. Because in PANEL struct var pos_x and var pos_y is followed by long flags. Thus vec_set gets it as third(z) component of vector and also sets it.

Last edited by Quadraxas; 12/15/09 22:49.

3333333333
Re: PROBLEM vec_for_screen [Re: Quad] #302045
12/16/09 07:48
12/16/09 07:48
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
np its great that i am not the only one who is pulling out his here's some days


"empty"

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

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