Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
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
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
vec_set() syntax error... Can you spot it? #391051
01/07/12 14:51
01/07/12 14:51
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
can anyone spot what is wrong with the following vec_set() instruction?:
Code:
VECTOR vec_n;
vec_set(vec_n, vector(random(500) -250, random(500) -250, random(500) -250);


-added parenthesis around "random(500) -250" but that didn't fix it.
-substituted "vec_n" for "vec_n.x" but that didn't fix it either.

I get a "sytax error" for that vec_set instruction


I have avoided the problem subtituting the "vec_set" instrucion with this:
Code:
vec_n.x=random(500) -250;
vec_n.y=random(500) -250;
vec_n.z=random(500) -250;


But I am still curious why that instrucion gave a syntax error...
Can any of you experts spot it?


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: vec_set() syntax error... Can you spot it? [Re: Carlos3DGS] #391052
01/07/12 15:08
01/07/12 15:08
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Your forgot the closing paranthesis for vec_set wink


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: vec_set() syntax error... Can you spot it? [Re: WretchedSid] #391053
01/07/12 15:10
01/07/12 15:10
Joined: Oct 2008
Posts: 513
Carlos3DGS Offline OP
User
Carlos3DGS  Offline OP
User

Joined: Oct 2008
Posts: 513
OMG... looked at it so many times and didn't spot that. I feel soooo dumb right now, seems I can't count parenthesis today! Sooooooo stupid!


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1
Re: vec_set() syntax error... Can you spot it? [Re: Carlos3DGS] #391059
01/07/12 17:42
01/07/12 17:42
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: Carlos3DGS
I feel soooo dumb right now, seems I can't count parenthesis today! Sooooooo stupid!

Don't feel stupid, these things happen more often to everyone than you'd might think. It actually is a problem of the IDE that you are using, SED doesn't show the parenthesis pairs. For example, in Xcode and TextMate (sorry, these only work on OS X and I have no Windows example), going over a closing parenthesis will highlight the opening one.
Still, these problems happen. Its usually a good idea to ask someone or just wait a day or so and look again.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com

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