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
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 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
Page 2 of 2 1 2
Re: temp "undeclared identifier" [Re: Shinobi] #223771
08/26/08 16:07
08/26/08 16:07
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Originally Posted By: Shinobi
Just include this line in your first postīs function code.
Code:
var temp; // thats all :)

Then this:
vec_normalize(temp[0],16);
will probably fail.

I think you need to alter george code so it fits for lite-c, or do it in c-script.


Click and join the 3dgs irc community!
Room: #3dgs
Re: temp "undeclared identifier" [Re: Joozey] #224414
08/29/08 23:24
08/29/08 23:24
Joined: Oct 2003
Posts: 560
Germany / NRW / Essen
Shinobi Offline
User
Shinobi  Offline
User

Joined: Oct 2003
Posts: 560
Germany / NRW / Essen
then maybe this could help ..
Code:
var temp[3];


Important part here is that you have to declare it first in the function , BTW if you declare temp like "var temp;" temp is not zero in lite-c .

Re: temp "undeclared identifier" [Re: Shinobi] #224431
08/30/08 01:45
08/30/08 01:45
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Maybe define a stuct? I think I read this elsewhere and it fixed the problem.

typedef struct
{
var x;// maybe try
var y;// float x
var z;// etc..
} temp;

???, not sure if this is right though. I am pretty new to "C" so...


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: temp "undeclared identifier" [Re: Nowherebrain] #224443
08/30/08 06:31
08/30/08 06:31
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
OK, this should do the job happily.

Outside any function, up the top somewhere add in
Code:
VECTOR* temp = { x=0; y=0; z=0; }

then anytime you come across a line using pure 'temp' (just 'temp' by itself - leave temp.x or temp.y or temp.z alone)
that wont compile (that is "cannot convert struct vector to fixed" or "cannot convert fixed to struct vector")
use 'temp.x' instead.

Thats how I had to do it to get C-script to convert.

*** CORRECTION ***
I have corrected the above snippet from VECTOR ... to VECTOR * ...
Leaving this * out could have caused many strange and seemingly unrelated faults.. Sorry. blush


Last edited by EvilSOB; 09/02/08 03:07. Reason: !! INCORRECT !!

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 2 of 2 1 2

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