shibdib 10 Posted October 24, 2013 (edited) The following is my init with the script in question bolded. call compileFinal preprocessFileLineNumbers "FAR_revive\FAR_revive_init.sqf"; null = [2] execvm "tpwcas\tpwcas_script_init.sqf" [b]execvm "spcheck.sqf";[/b] That script is { if(!isDedicated and !isMultiplayer) then { deleteVehicle _p2; hint "Singleplayer Mode Activated"; } But at some point it doesn't work. No errors show up in the log for it Edited October 25, 2013 by shibdib Share this post Link to post Share on other sites
sxp2high 23 Posted October 25, 2013 [color="#FF0000"][b]{[/b][/color] if(!isDedicated and !isMultiplayer) then { deleteVehicle _p2; hint "Singleplayer Mode Activated"; } This one (in red) is too much. This is how it should look like: if (!isMultiplayer) then { deleteVehicle _p2; hint "Singleplayer Mode Activated"; }; Share this post Link to post Share on other sites
shibdib 10 Posted October 25, 2013 (edited) Doing that got it to show up in the error log so that's progress.. Now the error is Error in expression <rike.Altis\spcheck.sqf" if(!isDedicated _and !isMultiplayer) then { deleteVehicl> Error position: <_and !isMultiplayer) then { deleteVehicl> Error Missing ) So I put a ) next to !isDedicated Get another error telling me to put a ; after the ) At this point doesn't that ruin the "and" statement? But once I have (!isDedicated); I get error Error in expression <ke.Altis\spcheck.sqf" if(!isDedicated); _and !isMultiplayer); then { deleteVehic> Error position: <_and !isMultiplayer); then { deleteVehic> [b]Error Undefined variable in expression: _and[/b] Now I'm completely confused.......... BUT I GOT IT WORKING!!! SO I tried something a bit different and went with if (!isDedicated && !isMultiplayer) then { deleteVehicle p2; hint "Singleplayer Mode Activated"; } Which works :D Edited October 25, 2013 by shibdib Share this post Link to post Share on other sites
sxp2high 23 Posted October 25, 2013 You're taking these error messages a bit too literally. :) The correct syntax would be: if (!isDedicated and !isMultiplayer) then { deleteVehicle _p2; hint "Singleplayer Mode Activated"; }; or: if (!isDedicated && !isMultiplayer) then { deleteVehicle _p2; hint "Singleplayer Mode Activated"; }; Both the same. However !isDedicated is not needed here, for it can never be true if isMultiplayer is false. Use what I posted above. :) Share this post Link to post Share on other sites
shibdib 10 Posted October 25, 2013 I had to remove the _ infront of p2 to get it to work, musta editted while you were posting, it gave me undefined variable errors if it was there. Share this post Link to post Share on other sites