Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Where is error here?! #330632
06/28/10 20:59
06/28/10 20:59
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
Engine says that there is syntax error:
Code:
function vec_randomize(&vec,&range)
{
	vec[0] = random(1) - 0.5;
	vec[1] = random(1) - 0.5;
	vec[2] = random(1) - 0.5;
	vec_normalize(vec,random(range));
}

BUT WHERE IS IT?! mad


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Where is error here?! [Re: 3run] #330633
06/28/10 21:00
06/28/10 21:00
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
are you using lite-c ?

if this a vector maybe you should write something like that.

Code:
function vec_randomize(VECTOR vec,var range)
{
	vec.x = random(1) - 0.5;
	vec.y = random(1) - 0.5;
	vec.z = random(1) - 0.5;
	vec_normalize(vec,random(range));
}



Re: Where is error here?! [Re: Rasch] #330634
06/28/10 21:02
06/28/10 21:02
Joined: May 2009
Posts: 5,367
Caucasus
3run Online OP
Senior Expert
3run  Online OP
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
yes, this is from an old c-script project. I want to convert this in to LITE-C.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Where is error here?! [Re: 3run] #330635
06/28/10 21:05
06/28/10 21:05
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
if you still gtet an error maybe it is:

Code:
function vec_randomize(VECTOR* vec,var range)
{
	vec.x = random(1) - 0.5;
	vec.y = random(1) - 0.5;
	vec.z = random(1) - 0.5;
	vec_normalize(vec.x,random(range));
}



Re: Where is error here?! [Re: 3run] #330637
06/28/10 21:07
06/28/10 21:07
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
The first argument should be a pointer:

function vec_randomize (VECTOR* vec, var range)
{
vec_set(vec,vector(random(1)-0.5,random(1)-0.5,random(1)-0.5));
vec_normalize(vec,random(range));
}

EDIT: Too late...

Last edited by Superku; 06/28/10 21:07.

"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

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