Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,534 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
ptr_for_name #271625
06/14/09 09:21
06/14/09 09:21
Joined: Jul 2007
Posts: 288
Germany, NRW
Martek Offline OP
Member
Martek  Offline 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: Martek] #271628
06/14/09 09:28
06/14/09 09:28
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
You can find all existing functions with the search tab in the manual, or in the afuncs.h file, but there is no ptr_for_name. So I dont think that such a function exists.

Re: ptr_for_name [Re: Tobias] #271632
06/14/09 09:36
06/14/09 09:36
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
str_for_entfile gives you the name of the Model, maybe it`s that what you need...

Re: ptr_for_name [Re: Widi] #271636
06/14/09 09:40
06/14/09 09:40

F
Fear411
Unregistered
Fear411
Unregistered
F



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: ] #271641
06/14/09 09:49
06/14/09 09:49
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Ok, sorry. But i think there is no so one function. If you have more entities with the same string-name, witch pointer should the engine return?

Re: ptr_for_name [Re: Widi] #271643
06/14/09 09:59
06/14/09 09:59

F
Fear411
Unregistered
Fear411
Unregistered
F



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 Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
ups, now i understand... laugh
Why not directly write the pointer in the file (handle)?

Last edited by Widi; 06/14/09 10:04.
Re: ptr_for_name [Re: Widi] #271663
06/14/09 10:55
06/14/09 10:55
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
I think engine_getvar is what he meant to use.

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 Offline OP
Member
Martek  Offline 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.
Code:
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
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

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 handle

and also pvars if you want to get a bit more advanced pVars

hope this helps

Page 1 of 2 1 2

Moderated by  aztec, Inestical, Matt_Coles, Tobias 

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