Jump to content

Schatten

Member
  • Content Count

    601
  • Joined

  • Last visited

  • Medals

Community Reputation

116 Excellent

2 Followers

About Schatten

  • Rank
    Master Sergeant

Profile Information

  • Gender
    Male
  • Location
    Minsk, Belarus

Recent Profile Visitors

561 profile views
  1. You use local variable, that is not available inside event handler. So, use global variable: blockTpp = compileFinal preprocessFileLineNumbers "viewHelper\blockTpp.sqf"; addMissionEventHandler["EachFrame", {call blockTpp}];
  2. Suspensions are not allowed in event handlers. Use spawn command to launch piece of code with suspension. As you can see, _contents is array. It is not allowed to use equality operator with arrays.
  3. @Exxor, sure, you incorrectly use equality operator. Use this code: _crateContents isEqualTo []
  4. @pappagoat, try this: this && ({(_x in thisList) && {player in _x}} count [veh1, veh2, veh3, veh4] > 0)
  5. Schatten

    Type object expected array

    @anaximandross, you just need to read BIKI and use what you need. In script you can use: _this select 0 -- the object which the action is assigned to _this select 1 -- the unit that activated the action _this select 2 -- ID of the activated action _this select 3 -- arguments given to the script if you are using the extended syntax (in your case array [position] and string)
  6. Schatten

    Type object expected array

    It depends on what position you want to get. As you can see, _this is not object or location, so you need to replace it. This is to reproduce the error you got.
  7. Schatten

    Type object expected array

    @anaximandross, as I expected, I got this error: 22:45:19 Error in expression <facilityCost"]; _storPosit = getPos _this; > 22:45:19 Error position: <getPos _this; > 22:45:19 Error getpos: Type Object, expected Array,Location I don't understand how you got your error.
  8. Schatten

    Type object expected array

    @anaximandross, provide your modified assembler.sqf please. What parameters do you pass to the script?
  9. Schatten

    Type object expected array

    @anaximandross, similarly: (_this select 3) params ["_facilityPositon", "_facilityType", "_facilityCost"]; But you pass only 2 arguments to assembler.sqf (e.g. [_position, "foodS"]). What's difference between _storPosit and _facilityPositon?
  10. Schatten

    Type object expected array

    @anaximandross, according to BIKI, 4th element of _this (_this select 3) is your arguments (_plotArray2, b2_term) passed to CreateBasePlots.sqf.
  11. Schatten

    Type object expected array

    @anaximandross, (_this select 3) params ["_markerLocationArray", "_target"];
  12. You are wrong. In your code you use if-statement without alternatives. If condition is not met nothing returns to selectRandom, what is wrong. You can use alternatives (using else), but I recommend you use switch command.
  13. Schatten

    Vehicle position VarName

    Sure: _position = getPos myvehiclevarname; or _position = getPos (missionNamespace getVariable "myvehiclevarname"); vehicles command returns all vehicles.
  14. @wendaf, well, can you provide test mission? P. S. Another way to get name is using name command (in script.sqf) insteand of using global variable.
×