1 registered members (AndrewAMD),
1,534
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
ptr_for_name
#271625
06/14/09 09:21
06/14/09 09:21
|
Joined: Jul 2007
Posts: 288 Germany, NRW
Martek
OP
Member
|
OP
Member
Joined: Jul 2007
Posts: 288
Germany, NRW
|
I searched for it in the manual and the online manual and found nothing. I found this function on the ent_for_name page and I think it's the function I must have for my script, but there is no descriptionfor ptr_for_name()
Mfg, Martek
3D Gamestudio A7 Extra
|
|
|
Re: ptr_for_name
[Re: Widi]
#271636
06/14/09 09:40
06/14/09 09:40
|
Fear411
Unregistered
|
Fear411
Unregistered
|
He wants to get a pointer from a string. He writes a String into a file like "player" and then he reades the string out of the file and wants to get the player pointer.
|
|
|
Re: ptr_for_name
[Re: Widi]
#271643
06/14/09 09:59
06/14/09 09:59
|
Fear411
Unregistered
|
Fear411
Unregistered
|
No, not the String name. The actual pointer like action player_act() { player = me; }
and in a file he writes "player" and the he wants to get the player pointer.
|
|
|
Re: ptr_for_name
[Re: ]
#271644
06/14/09 10:01
06/14/09 10:01
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
ups, now i understand... Why not directly write the pointer in the file (handle)?
Last edited by Widi; 06/14/09 10:04.
|
|
|
Re: ptr_for_name
[Re: Tobias]
#271902
06/15/09 16:12
06/15/09 16:12
|
Joined: Jul 2007
Posts: 288 Germany, NRW
Martek
OP
Member
|
OP
Member
Joined: Jul 2007
Posts: 288
Germany, NRW
|
I've tried engine_getvar... But I don't know if I use it correctly. I have a function, which gets the string and a pointer as parameters. function MyFunction(STRING* FileStr, ENTITY* Object) At the end of this function, I return the ENTITY* Object, because I want to convert the string into a pointer. Which function do I need for this? I think with engine_getvar I need a double pointer, but I don't know how.
3D Gamestudio A7 Extra
|
|
|
Re: ptr_for_name
[Re: Martek]
#271905
06/15/09 16:22
06/15/09 16:22
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
Convert the string to a pointer, or the string to a handle? have a look at handle and ptr_for_handle handleand also pvars if you want to get a bit more advanced pVarshope this helps
|
|
|
|