Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/01/26 16:40
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (USER0328, Quad), 5,448 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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 | 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