Jump to content
Sign in to follow this  
Joe98

Simple script will not run

Recommended Posts

My script has 47 lines. Here I am testing just one line. It will not run.

name of script: one.sqf

Details of script:

{

deletevehicle box1;

}

Code to call script:

nul = [] execVM "one.sqf"; //the spaces are a bit exaggerated

I cannot make the script run! What is wrong?

Share this post


Link to post
Share on other sites

Yes you are correct thank you.

Removing the curly brackets solves the problem.

However in my study of scripts, every script begins with { and ends with }.

My script does not require those. Why is that?

.

Share this post


Link to post
Share on other sites
However in my study of scripts, every script begins with { and ends with }.

because they don't. ;) https://community.bistudio.com/wiki/Code

In sqf you don't put curled brackets around a script, because the script itself is code. There's just no need for that.

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  

×