Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Pointers in loop #260688
04/13/09 00:21
04/13/09 00:21
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
as i have

Code:
action act1()
{
you = ent_create(***);
***

while(1)
{

you.pos=my.pos;
wait(1);
}
}


may i recall you in the loop(with saving and restoring handle like you = ptr_for_handle(my.skill80)) before changing position, or its unnecessary in this case?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Pointers in loop [Re: VeT] #260700
04/13/09 02:35
04/13/09 02:35
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
"you" IS remembered during wait's, as long as you dont do any
c_move, c_trace type stuff in THIS function.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Pointers in loop [Re: EvilSOB] #260715
04/13/09 07:38
04/13/09 07:38
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
so, if i'd need to move entity and wouldnt want to restore "you" from handle, i may to use

Code:
void MoveMyEnt()
{
***
c_move(***);
}

action act1()
{
you = ent_create(***);
***

while(1)
{
MoveMyEnt();
you.pos=my.pos;
wait(1);
}
}

?


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Pointers in loop [Re: VeT] #260721
04/13/09 08:24
04/13/09 08:24
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Thats correct, but it seems a but messy doesnt it?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Pointers in loop [Re: EvilSOB] #260724
04/13/09 08:34
04/13/09 08:34
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline OP

Serious User
VeT  Offline OP

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Ah, yes, a little paradox with positioning smile
But it doesnt matter as there is example, i just needed to specify about pointers

Thank you, Sob


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Pointers in loop [Re: VeT] #260730
04/13/09 08:47
04/13/09 08:47
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
No prob, bob.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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