Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Quad, AndrewAMD, 1 invisible), 18,553 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
action lifetime #406746
08/28/12 15:10
08/28/12 15:10
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline OP
Member
Arrovs  Offline OP
Member

Joined: Apr 2006
Posts: 159
Latvija
Hello mates.
Im not absolutely sure on one thing so i vish to hear your opinions and experience.
So after some tests i start to think, vhen model is deleted its action permanently deletes too so not letting it to execute some important lines.

Small example:
Code:
action darbiba()
{
//some initialization here
STRING* stringulio = str_create("blablabla");
while(my != NULL)
{
//do something here
wait(1);
}
//and here is some thing deleting
ptr_remove(stringulio);
}



So hov you see cycle vorks vhen model exists, but vhen its not anymore it should delete string, but it dont happens for me - so i decided about proccess vhat i said in first paragraph.
I think this vorked in c-script.


Arrovs once will publish game
Re: action lifetime [Re: Arrovs] #406752
08/28/12 19:06
08/28/12 19:06
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
"my" or "me" will never get NULL until you explicitely set it to NULL and hence ptr_remove will never be called. The action will be terminated as soon as the corresponding entity gets removed.


Always learn from history, to be sure you make the same mistakes again...
Re: action lifetime [Re: Uhrwerk] #406759
08/28/12 22:03
08/28/12 22:03
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Code:
action darbiba()
{
   STRING* stringulio = str_create("blablabla");
   //
   while(my != NULL)
   {
      //do something here
      //
      proc_mode=PROC_GLOBAL;     //this line must run EVERY loop before wait
      wait(1);
   }
   //
   ptr_remove(stringulio);
}



"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 | 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