Jump to content
Sign in to follow this  

Vehicle init script debug error

Recommended Posts

Edit: Nvm close this please. i just fixed the dedicated server issue (forgot to do an isDedicated check) so now putting the script in the vehicle init isn't required.


Hey guys, i've been away from the ArmA scene for a while but it's all coming back pretty quick.


I feel like ArmA is lying to me; in the init of a vehicle i have the following:

nul = [this] execVM "scripts\mhq\respawnmhq.sqf";

and the first two lines of respawnmhq.sqf are:

_mhqveh = _this select 0;
_vehiclepos = getPos _mhqveh;

So then when i launch the mission to test in the editor it has the gall to say respawnmhq.sqf has an: "Error getpos: Type Array, expected Object,Location".


Correct me if I'm wrong, but there is no damn array in there right? [this] is an array with a single item from what i know but it's in the vehicle init not the script, _mhqveh is defined as the 'this' from within the array so is that causing it to think _mhqveh is an array? If so is there another way to execVM that script from the vehicle init?


I'm doing this to avoid putting this script in the Init.sqf because really it doesn't need to go in there and if i do that it activates twice on dedicated servers but that's another issue entirely (which I'm pretending doesn't happen).

Share this post

Link to post
Share on other sites

No error here as far. You're probably execVM something else with this script.

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