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
0 registered members (), 16,302 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
string as function name (ent_create) #339987
08/30/10 16:24
08/30/10 16:24
Joined: Jan 2002
Posts: 300
Usa
Rich Offline OP
Senior Member
Rich  Offline OP
Senior Member

Joined: Jan 2002
Posts: 300
Usa
Just wanted to see if something like this was possible, I've been testing it with no success. I'm thinking I'm doing it wrong, but maybe it's not possible:

Code:
ent_create(my.string1,my.x,my.string2 );



Note : my.string1, my.string2 are the entity strings, set in WED.

I'm trying to use a string as function parameter of ent_create.

I've tried typecasting but I'm not even sure which type or the proper syntax. (EVENT*)my.string2

Thanks for any help! laugh

Last edited by Rich; 08/30/10 16:25.

A8 com / A7 free
Re: string as function name (ent_create) [Re: Rich] #339988
08/30/10 16:55
08/30/10 16:55
Joined: Nov 2009
Posts: 89
Germany, NRW
T
TrackingKeks Offline
Junior Member
TrackingKeks  Offline
Junior Member
T

Joined: Nov 2009
Posts: 89
Germany, NRW
Code:
ent_create(my.string1,my.x,engine_getscript(my.string2) );



This should work


Gamestudio: A7.82 Commercial/A8 Commercial
System specs (Laptop):
Windows 7 64bit
DirectX v10.1
Intel Core i7-720QM CPU @ 1,60 GHz
4GB DDR2 Ram
NVIDIA GeForce GT 230M (1024MB)
Re: string as function name (ent_create) [Re: TrackingKeks] #339996
08/30/10 17:50
08/30/10 17:50
Joined: Jan 2002
Posts: 300
Usa
Rich Offline OP
Senior Member
Rich  Offline OP
Senior Member

Joined: Jan 2002
Posts: 300
Usa
Works great, Thank you very much! laugh


A8 com / A7 free

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