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, juanex, Grant), 1,018 guests, and 8 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
proc_kill(4); #200662
04/05/08 08:28
04/05/08 08:28

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



Hi! (lite-c v7.07.6)

"proc_kill(4); beendet alle anderen Instanzen der aktuellen Funktion.."

 Code:
function do_someting_for_all_models() {

  proc_kill(4);   // only one instance
  wait(1);
  ...
}

action act_mymodel() {
  ...
  if(a==b){
    do_someting_for_all_models();
  }
  ...
}


Now I expect, that do_someting_for_all_models(); only exists in one instance, but the actions of the models (act_mymodel()) keep on running.

I figured out proc_kill(4); kills (also) all instances of the calling action.

Re: proc_kill(4); [Re: ] #201131
04/07/08 06:20
04/07/08 06:20
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Yes, that's right. Reason is that proc_kill was called before and not after the wait(). Put it after the wait and it will work as expected.

Proc_kill(4) kills all instances of the action currently started by the scheduler. This is only identical to the current action when this action encountered a wait() before. I admit that this can be confusing. I'll check if I can improve this.

Re: proc_kill(4); [Re: jcl] #201144
04/07/08 08:20
04/07/08 08:20

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



ah, I see! thanx!


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