Jump to content
Sign in to follow this  
Cain_

Getting sleep to work!

Recommended Posts

Im call this script from init.sqf, this script is also in sqf. When i run it I get an error saying

"Error Generic Error in expression

sleep 1.0"

What have i done wrong now?

team_score=0;


while {team_score<=180} do {

if (player distance fire_team_a<= 50) then {team_score=team_score+1;]};
hint "Team Score";
team_score=team_score+1;

sleep 1.0;
};

Edited by Cain_

Share this post


Link to post
Share on other sites

exec not execVM

with execVM I get the whole file as an error

Edited by Cain_

Share this post


Link to post
Share on other sites
exec not execVM

with execVM I get the whole file as an error

Exec is for .sqs files, execVM is for .sqf files.

team_score=0;

while {team_score<=180} do 
{

  if ((player distance fire_team_a) <= 50) then 
 {
      team_score = team_score + 1;
      hint "Team Score";
  };

sleep 1;
};

_neo_

Share this post


Link to post
Share on other sites
Myke;1791143']

/QUOTE]

_neo_

Thanks guys, got it working. :)

:bounce3::bounce3:

Share this post


Link to post
Share on other sites

Cain, do yourself a favour and download squint - it would have told you about the extraneous square bracket in that last example before you'd even run the script.

Share this post


Link to post
Share on other sites
Cain, do yourself a favour and download squint - it would have told you about the extraneous square bracket in that last example before you'd even run the script.

I never could get it to run on my x64 system, says program is 32 bit. :confused:

jesus it works now :)

thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×