Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, howardR), 472 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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