Jump to content

Error Undefined variable in expression


Recommended Posts

Hello i added the intro cam to my server and i have an error in the log. i dont find where is the error. I give you my log.

fn_IntroCam.sqf:

/*	
File: fn_IntroCam.sqf	
Author: Dexter	
( script might already be known, havent seen it yet though ) 
*/
private ["_camera", "_camDistance","_randCamX","_randCamY","_camTime"];

_camDistance = 350;

_randCamX = 75 - floor(random 150);

_randCamY = 75 - floor(random 150);

_camTime = 30;

// you can change the time for sure, I adjusted mine to the intro music
// the one below basically says that if you already joined the server once the time of the camera movement will be faster, else it might get annoying
if(!life_firstSpawn) then {
_camTime = 30;
};

//intro move
showCinemaBorder true;
camUseNVG false;

_camera = "camera" camCreate [(position player select 0)+_randCamX, (position player select 1)+_randCamY,(position player select 2)+_camDistance];
_camera cameraEffect ["internal","back"];
_camera camSetFOV 2.000;
_camera camCommit 0;
waitUntil {camCommitted _camera};
_camera camSetTarget vehicle player;
_camera camSetRelPos [0,0,2];
_camera camCommit _camTime;
waitUntil {camCommitted _camera};
_camera cameraEffect ["terminate","back"];
camDestroy _camera;
life_firstSpawn = false;

And the RPT Log:

Successfull attempt to execute serverCommand '#exec users' by server.
[]
Error in expression <oor(random 150);

_camTime = 30;



if(!life_firstSpawn) then {
_camTime = 30;
}>
  Error position: <life_firstSpawn) then {
_camTime = 30;
}>
  Error Undefined variable in expression: life_firstspawn
File mpmissions\Altis_Life.Altis\scripts\fn_introcam.sqf..., line 18

Thanks for you help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.