Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (lijoyi2011), 1,034 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | 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