Kettlewell 1 Posted March 26, 2013 I wondered if anyone could check out my code to spot what mistake I'm making. Client\CaptureIran.sqf object = _this select 0; activator = _this select 1; //if (side activator == east) exitWith { hint "You cannont capture your own FOB." }; if (IranCapture) exitWith { hint "The FOB is already being captured." }; if (IranInCooldown) exitWith { hint "You cannot attempt to capture the FOB again yet." }; publicVariableServer "CapRed"; Server\Init.sqf CaptureIran = compile preprocessFileLineNumbers "server\CaptureIran.sqf"; "CapRed" addPublicVariableEventHandler { _name = _this select 0; _params = _this select 1; _params spawn CaptureIran; }; The problem is that CaptureIran.sqf on the server does not get ran, I checked the RPT file to find zero errors and I have added some debug code at the start of the file but it doesn't show up meaning it isn't getting ran. I appreciate any help that someone can give. Share this post Link to post Share on other sites
Jezuro 452 Posted March 26, 2013 Just guessing here, but the problem may be that hints don't show up directly upon mission start (time has to be > 0 if a hint is to be shown). Share this post Link to post Share on other sites
Kettlewell 1 Posted March 26, 2013 Just guessing here, but the problem may be that hints don't show up directly upon mission start (time has to be > 0 if a hint is to be shown). The code runs around 20-40 seconds in game depending on how fast someone can run to the cap. Share this post Link to post Share on other sites
Kettlewell 1 Posted March 26, 2013 Are using publicvariables the only way to retrieve variable data from the server to the client or to call a file on the server with a command on the client? Because these public variables aren't working and it doesn't seem anyone knows why. Thank You. Share this post Link to post Share on other sites
Kettlewell 1 Posted March 27, 2013 Bumping this up once to see if anyone can assist, still stuck on the same issue. Share this post Link to post Share on other sites
conroy 13 Posted March 27, 2013 Did you initialize the CapRed variable somewhere on the client? Share this post Link to post Share on other sites
Kettlewell 1 Posted March 27, 2013 Did you initialize the CapRed variable somewhere on the client? I haven't initialized it in the client. Share this post Link to post Share on other sites
galzohar 31 Posted March 27, 2013 Just guessing here, but the problem may be that hints don't show up directly upon mission start (time has to be > 0 if a hint is to be shown). I've experienced the exact opposite. Stuff like sideChat may not work, but hints seem to show even when they run from an init line of a unit. Then again, Arma 3 alpha seems to have many hint-related bugs (hints not showing in general or showing with a huge delay for reasons I couldn't figure out nor reproduce reliably), but this has nothing to do with mission start time, as it can happen at any point during the mission. First make sure the script actually doesn't run at all by adding a player sideChat and/or diag_log line at its beginning (sideChat is more risky as it requires radio and player to not be null, but doesn't require looking at the RPT file like diag_log, can be scrolled up and doesn't bug out like hint does). If the script does run, see how far it gets using a similar method and then figure why it gets stuck (undefined variable, for example, can cause strange problems and not always show an undefined variable error). If it doesn't run, debug whatever is calling your script. In any case, make sure you always run your game with the -showScriptErrors startup parameter, so you don't have to constantly monitor your RPT file. Either add it to the command line or use a launcher such as Play withSIX to enable it (preferably along with -nosplash and -skipintro to make the game load faster). Share this post Link to post Share on other sites
killzone_kid 1333 Posted March 28, 2013 CapRed is not defined anywhere on the client? Share this post Link to post Share on other sites
engima 328 Posted March 29, 2013 What does "Server/Init.sqf" mean? Is it executed from "init.sqf", and how? Share this post Link to post Share on other sites