Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by madpower2000. 07/22/26 14:01
ZorroGPT
by TipmyPip. 07/21/26 17:54
New Zorro version 3.11
by jcl. 07/21/26 13:42
Lapsa's very own thread
by Lapsa. 07/18/26 13:40
Purchase A8 full licence version
by ukgamer. 07/17/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 9,798 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ent_for_name issue #243014
12/27/08 02:35
12/27/08 02:35
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
When I place a "Position" entity in WED and set its name "Start_Pos", I then run my script which reads:

level_load("level1.wmb");
wait(1);
mouse_mode =0;
var x = ent_for_name("Start_Pos");
if ( x==NULL ) printf("No start");

and x is always NULL. What am I doing wrong/misunderstanding?

-David

PS. Sorry if this is the wrong forum.

Re: ent_for_name issue [Re: DavidM] #243331
12/29/08 14:42
12/29/08 14:42
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Because ent_for_name returns an ENTITY* not a var.
You need to change the ent_for_name line to
ENTITY* x = ent_for_name("Start_Pos");
Then the IF line will work fine.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ent_for_name issue [Re: EvilSOB] #243634
12/31/08 00:36
12/31/08 00:36
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
Thanks Evil.


Moderated by  HeelX, rvL_eXile 

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