Search the Community
Showing results for tags 'scripting error'.
Found 4 results
-
Hello guys. I've basically created an account to ask for your help as I really don't have any idea what's going on. I'm currently doing a little experiment with some scripts I found on the Steam workshop. I created my mission and created an init.sqf file for testing purposes (of course, inside the mission I created). After that and several tests, I decided to stop and continue today. Nevertheless, for some reason, when I loaded the mission I was welcomed with an error message saying: "Script C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf not found". My first thought was to make sure my init.sqf was actually a sqf file just in case Windows messed up with my stuff. But it didn't, it is an sqf file and everything is exactly how it was yesterday, after checking the RPT files I saw this: 20:45:49 Invalid path (only relative paths supported): 'C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf' 20:45:49 Warning Message: Script C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf not found 20:45:49 ScriptVM file C:\Users\USUARIO\Documents\Arma 3 - Other Profiles\[Sgt]%20Zeonn\missions\DiosDelClimaTEST.Altis\init.sqf cannot be opened! It doesn't make any sense because the file path is correct, and file extension is correct (I did the full extension thing, save the file on Notepad++ and with Visual Studio to be double sure). I was about to give up when I loaded another mission, imagine my surprise when I saw the exact same error message, it's happening in all my missions. Even the older ones (like Liberation). However, I discovered that if I export the mission using the editor option (the one that saves it in the steam folder Arma3/missions as a PBO), and loaded using the Scenario option in the main menu, the init.sqf LOADS PERFECTLY, and everything runs as it's supposed to. I don't what's going on, and I have no idea how to solve it. I already tried creating a new profile, reloading the missions, verifying the game files, and everything. Would you guys help me on this? Forgot to mention: if I do an execVM "init.sqf" it also detects the file. Which makes even less sense.
-
setcurrentwaypoint Error with SetCurrent Waypoint.
Crotchety_Old_Buzzard posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am getting "Error Type Array, expected Group" when attempting to use setCurrentWaypoint, even though I am putting a group class variable in the correct position in the following script: _grpLiftHeli = createGroup east; _vehLiftHeli = createVehicle ["O_Heli_Transport_04_F", getMarkerPos "wpHeli_1", [], 0, "FLY"]; createVehicleCrew _vehLiftHeli; _vehLiftHeli setDir 240; _grpLiftHeli addVehicle _vehLiftHeli; _wpHeli1 = _grpLiftHeli addWaypoint [getPos wp6, 0]; _wpHeli1 waypointAttachObject TempTarget; _wpHeli1 setWaypointType "HOOK"; _grpLiftHeli setCurrentWaypoint [_wpHeli1, 1]; //group _vehLiftHeli setCurrentWaypoint [_wpHeli1, 1]; The error always gives the setCurrentWaypoint line number with the above listed explanation. I use prefixes that tell me the data type of the variables to avoid these kinds of trouble. As you can see, _grpLiftHeli is the created group I am using. addVehicle and addWaypoint require a Group Data Type for their opening parameters, as does setCurrentWaypoint. I used the same variable "_grpLiftHeli" for all three statements, yet, while addVehicle and addWaypoint give no errors, setCurrentWaypoint gives the "Error Type Array, expected Group" message. In the debug console I watched "xxx = groupID _grpLiftHeli;" and got back "Alpha 2-1", so it seems to be a proper group. I also tried replacing the last code line with the commented code line below it with the same results. I believe my syntax is correct based on BIS wiki, but know I still make mistakes. If anyone can explain this to me, I would be greatly appreciative. EDIT: I forgot to mention that I used the same general setup for creating a vehicle convoy and had no problems with the error. setCurrentWaypoint worked fine. -
Howdy, I'm trying to use a script that I 'borrowed' from a mission a friend shared with me. I believe the original script is by SPUn/LostVar (at least that's who's credited in the files I have), and the files I use were found in the mission "Operation Dagger" by OneShot. I'm getting an error message every time a trigger is tripped that calls on the "fillhouse" script that, in turn calls the "nearestBuilding" script that then calls on the "Patrol-vG" script. I know next to nothing about scripts, but if I read the error correctly, I think the problem is in the patrol-vG script. Anyway, the error popup states... '...t] call LV_nearestBuilding; _building = |#| _buildings select 0; while { alive _un...' Error undefined variable in expression: _buildings File C:\Users\etc\etc Profiles\etc\missions\testA.Altis\LV\Patrol-VG.sqf, line 12 The Patrol-vG script (part of it anyway (I don't want to step on anyones toes y'know...)) is as follows: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ///////Simple House Patrol script vG 1.3 - SPUn / LostVar // //*infantry units patrols inside nearest building and outside of it //*Syntax: nul = [this] execVM "LV\patrol-vG.sqf"; private ["_unit","_newPos","_i","_i2","_bPoss","_building","_dir","_range","_curPos","_outOrNot"]; if(isNil("LV_nearestBuilding"))then{LV_nearestBuilding = compile preprocessFile "LV\LV_functions\LV_fnc_nearestBuilding.sqf";}; _unit = _this select 0; _buildings = ["nearest one",_unit] call LV_nearestBuilding; _building = _buildings select 0; while { alive _unit }do{ if(isNull(_unit findNearestEnemy _unit))then{ _unit forceSpeed 1; _unit setBehaviour "SAFE"; }; _bPoss = []; _i = 0; while { ((_building buildingPos _i) select 0) != 0 } do { _bPoss set [count (_bPoss), (_building buildingPos _i)]; _i = _i + 1; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ I'm assuming that the "LV_nearestBuilding" code works, since it states that the error occurs in line 12. But like I said...I know very little about scripting. Any help would be greatly appreciated.
-
addAction 11 elements provided, 3 expected
stingray_ posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hello, I am trying to add a simple action to a unit and am failing at the most basic step. Below is what I am running in the Extended Debug Console. player addAction ["Hello World", "hint 'Hello'", nil, 1, false, true, "", true, 0, false, ""] I understand the syntax is as follows, object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection] Ref: https://community.bistudio.com/wiki/addAction However, when i execute this statement, I get the following error. 'player |#|addAction ["Hello World", "hint 'Hello'"...' Error 11 elements provided, 3 expected. I have also tried {} instead of "" around the code and that doesn't fix it. It works if i remove everything to the right of the script element but I want to eventually change the condition. Can anyone tell me what i'm doing wrong?