Jump to content
  • 0

Calling files in server pbo from infistar


kheldar125

Question

Just two simple questions no doubt you guys can answer easily. 

 

1) I'm trying to call a script that runs server side from infistars admin menu. I'm doing it this way as I'm passing player location data into the script from a custom function added to the menu. 

Currently I have 

                 _pos = getPos player;
							
				[_pos]execVM "\z\addons\dayz_server\modules\target_drop.sqf";
				hint format ['Sucessful call on %1',_name];

But its saying the file cannot be found, (yes iv checked its there xD) I'm assuming that now infistars tools are outside the server pbo they have trouble accessing it? 

I'v only just started writing my own scripts so please correct me if I'm wrong (which I probably am). 

 

Cheers

 

 

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
7 minutes ago, kheldar125 said:

\z\addons\dayz_server\modules\target_drop.sqf

You are right with your suggestion!
The problem you have is that you can't use this path because infistar is located in another seperate folder. If you want to call a script in your server.pbo you need to write down the exact path in there.

Link to comment
Share on other sites

  • 0
13 minutes ago, DAmNRelentless said:

You are right with your suggestion!
The problem you have is that you can't use this path because infistar is located in another seperate folder. If you want to call a script in your server.pbo you need to write down the exact path in there.

Its nice to have got something right at last :smile:.   Am i right in thinking something along the lines of 

[_pos]execVM "@DayZ_Epoch_Server\addons\dayz_server\modules\target_drop.sqf";

Would be right then? 

 

Cant test it currently as I'm working. 

Link to comment
Share on other sites

  • 0
11 minutes ago, kheldar125 said:

Its nice to have got something right at last :smile:.   Am i right in thinking something along the lines of 


[_pos]execVM "@DayZ_Epoch_Server\addons\dayz_server\modules\target_drop.sqf";

Would be right then? 

 

Cant test it currently as I'm working. 

No, you need to set the path from your rootfolder to that file. It should look something like:

execVM "\@DayZ_Epoch_Server\addons\dayz_server\modules\target_drop.sqf";

So you were almost right but it's important to make a backslash in front of the path because the origin folder is the root folder of your server. At least that's how I did it in 1.0.5.1. I guess you would have to test it :D

Link to comment
Share on other sites

  • 0
1 hour ago, DAmNRelentless said:

execVM "\@DayZ_Epoch_Server\addons\dayz_server\modules\target_drop.sqf";

Cant believe I forgot the \ at the beginning.

Just had chance to test it and its still not liking the path. 

 

Current function is calling:

[_pos] execVM "\@DayZ_Epoch_Server\addons\dayz_server\modules\target_drop.sqf";

 

In game message and client RPT report:

Warning Message: Script @DayZ_Epoch_Server\addons\dayz_server\modules\target_drop.sqf not found

 

 

Thanks for your help. I will keep trying and post back if i find something that works. 

 

Never Give Up :smile:

Link to comment
Share on other sites

  • 0

if you put the file in your infistar folder and use #include, you shouldn't need a path.

The only thing is im not a scripter so im not sure what difference is with execVM and #include lol

#include " target_drop .sqf"

Edit: using the path you originally posted, should be the way it works... I've always done it that way

maybe putting the file in the infistar folder and changing its path to the inifistar folder might do the trick.

Link to comment
Share on other sites

  • 0
2 hours ago, theduke said:

if you put the file in your infistar folder and use #include, you shouldn't need a path.

The only thing is im not a scripter so im not sure what difference is with execVM and #include lol

#include " target_drop .sqf"

Edit: using the path you originally posted, should be the way it works... I've always done it that way

maybe putting the file in the infistar folder and changing its path to the inifistar folder might do the trick.

The difference between #include and execVM is that you execute the sqf-file everytime this command is used and with #include you add this file to the one where this is written in. #Include is normally not used in sqf. It's made for hpp like in the description.ext because it just extends a file to avoid a large file.

It's weird that this path is not working though. If you got a solution, let us know please.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...