Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using temp #232791
10/23/08 23:27
10/23/08 23:27
Joined: Oct 2008
Posts: 5
K
Krunk Offline OP
Newbie
Krunk  Offline OP
Newbie
K

Joined: Oct 2008
Posts: 5
On various code snippets i see, i see the use of a value called 'temp'. However, if i try to compile my program, it tells me that temp is an undeclared identifier. Can some1 help please?

Its kinda urgent blush

Re: Using temp [Re: Krunk] #232797
10/24/08 00:14
10/24/08 00:14
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline
User
garv3  Offline
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Well, I don't get this either crazy

But you may just declare it at the very beginning of your code (before your main function). Then it is a superglobal variable. But bear in mind that a superglobal variable may be changed by another function during a wait() of the function you use it in.

That's just how I would use it....


GameStudio Version: A7 Pro v7.86
Re: Using temp [Re: garv3] #232798
10/24/08 00:27
10/24/08 00:27
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
ermm in C-script (.wdl) i'm sure temp was a built-in variable used to hold temporary data.

In lite-c (.c), temp isn't built in anymore and so must be declared manually. It is usually used to store vector positions so use something like...

VECTOR* temp[3];

..at the top of your script, and it should work.

Re: Using temp [Re: DJBMASTER] #232799
10/24/08 00:58
10/24/08 00:58
Joined: Oct 2008
Posts: 5
K
Krunk Offline OP
Newbie
Krunk  Offline OP
Newbie
K

Joined: Oct 2008
Posts: 5
yeah, i realised i was using C-script in c-lite...

Re: Using temp [Re: Krunk] #232800
10/24/08 00:59
10/24/08 00:59
Joined: Oct 2008
Posts: 5
K
Krunk Offline OP
Newbie
Krunk  Offline OP
Newbie
K

Joined: Oct 2008
Posts: 5
am still struggling with gravity and jumping smirk

Re: Using temp [Re: Krunk] #232839
10/24/08 13:45
10/24/08 13:45
Joined: Jan 2005
Posts: 605
Deutschland, NRW
G
garv3 Offline
User
garv3  Offline
User
G

Joined: Jan 2005
Posts: 605
Deutschland, NRW
Originally Posted By: Krunk
am still struggling with gravity and jumping smirk

That`s one of my most hated topics too!


GameStudio Version: A7 Pro v7.86
Re: Using temp [Re: garv3] #232956
10/25/08 13:35
10/25/08 13:35
Joined: Oct 2008
Posts: 23
A
ApenasEu Offline
Newbie
ApenasEu  Offline
Newbie
A

Joined: Oct 2008
Posts: 23
Been thinking of that myself as of late, i figured i could use an incremental value for jumping using the cos(x) function, so i would get a big increase and gradually decrease as gravity suposedly kicks in, but i am kinda uncertain if this is the right direction, what you guys have come up with? Im still on the very basis of coming up with code so im still just thinking in REALLY broad terms... but just felt like butting in on the conversation about something i was just thinking about aswell.

P.S: Im just crappy when it come to math, hence why im just trying to figure out the basis of jumping and what to use

Last edited by ApenasEu; 10/25/08 13:50.
Re: Using temp [Re: ApenasEu] #233042
10/26/08 07:43
10/26/08 07:43
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
VECTOR* temp[3];

This is an array of 3 vectors

Use
VECTOR* temp; for pointer
or
VECTOR temp;

Or?


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.

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