Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, DonQuijote), 933 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Function freezing #73045
05/03/06 05:43
05/03/06 05:43
Joined: Dec 2003
Posts: 179
Chameleon_Man Offline OP
Member
Chameleon_Man  Offline OP
Member

Joined: Dec 2003
Posts: 179
Hey guys,

Okay, I understand from using C-Script that the code is read top to bottom, and when a function is read, it initiates the function while continuing to read the code. How do I do it so that when it gets to the function, it stops and goes through the function, and at the end of the function it continues on its path? I'm used to simple command-line C++, so C-Script somewhat confuses me. Thanks a ton guys.

-Harb

Re: Function freezing [Re: Chameleon_Man] #73046
05/03/06 05:47
05/03/06 05:47
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
Lets just suppose i didnt read the sentence "and at the end of the function it continues on its path? " because it makes absolutely no sense.

Lets just suppose I just read your thread title, then while loops are what you are looking for:

var somevariable;

function dosomething
{
while(1){
while(somevariable){wait(1);}
//add some stuff here
wait(1);
}
}

you just have to set var somevariable to 1 to freeze the function.


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku

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