Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (mistery, AndrewAMD), 5,780 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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