OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: ZapBrannigan on 02 Sep 2010, 08:21:10
-
Why when i make a script and in the script write
player action ["eject",vehicle player]
then execute it with eject = [] execvm"eject.sqf" it works fine, but if i do
_vp = vehicle player
player action ["eject", _vp]
then nothing happens....
and if i do like
_m1 = _this select 0
_vm = vehicle _m1
_m1 action ["EJECT",_vm]
and execute it with eject = [player] execvm"eject.sqf" then also nothing happens
if i remember correctly it worked fine when i did that in ofp
so confusing..
thanks
-
They don't work since you're writing SQS instead of SQF.
SQF is not line based and you need to close each statement with a semicolon.
-
Add -showScriptErrors to your startup command line to get back the old-school script errors from OFP/ArmA. I guess they removed them because they didn't want their own script errors to show up :P
Wolfrug out.
-
Ahh, i see. thank you for the help. I seem to be able to manage a sqf script. But i am so used to sqs and it doesnt seem like theres much you can do with sqf that you cant do with sqs why the change?...
and for that matter why the change in the way the briefings made. its now with sqf too. shame cause i thought the old briefing style with the notebook was soo much better
cheers
-
Create the following code using SQS:
switch (_var) do {
case "A": //doSomethingA
case "B": //doSomethingB
case "C": //doSomethingC
case "D": //doSomethingD
case "E": //doSomethingE
case "F": //doSomethingF
case "G": //doSomethingG
case "H": //doSomethingH
case "I": //doSomethingI
};
Player sideChat "DoSomething";
And you'll notice that your code will get significant larger and contains a lot of jumps.