Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
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
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 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: Convert entity handle pointer for string [Re: NeoNeper] #415533
01/19/13 21:45
01/19/13 21:45
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: NeoNeper
I'll use mysql. I can not use numbers, only string to query.

Two things;
1) Don't use mysql!
2) Don't use mysql!
3) When ignoring 1 and 2: For heavens sake, use parameter substitution!

Also, you are leaking memory all over the place and make things more complicated than they need to be.

PS; The handle of an entity is quite volatile, I wouldn't rely on it in any way across application runs.

Last edited by JustSid; 01/19/13 21:57.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Convert entity handle pointer for string [Re: MasterQ32] #415537
01/19/13 22:29
01/19/13 22:29
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
tanks Taster032.

work this way:

long i= *((long*)(&hand_pointer));
str_for_int(n,i);


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Convert entity handle pointer for string [Re: NeoNeper] #415540
01/20/13 00:55
01/20/13 00:55
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Reread JustSid's post. Then fix your code and thank him.


Always learn from history, to be sure you make the same mistakes again...
Re: Convert entity handle pointer for string [Re: Uhrwerk] #415859
01/24/13 20:55
01/24/13 20:55
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
what is the correct format for position x,y,z?

Sample:

VECTOR temp;
vec_set(temp,player.x);

int pos_x = temp.x?
long pos_x = temp.x?
?????


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Convert entity handle pointer for string [Re: NeoNeper] #415860
01/24/13 20:56
01/24/13 20:56
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Originally Posted By: atypes.h
typedef struct VECTOR {
var x,y,z;
} VECTOR;


"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
Re: Convert entity handle pointer for string [Re: Superku] #415867
01/24/13 23:47
01/24/13 23:47
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Tankds Superku


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
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