A3Wasteland / ArmA3_Wasteland.Stratis

A3Wasteland is a survival sandbox mission for Arma 3 where two teams and independent players fight for survival. Built in collaboration between GoT, TPG, KoS, 404Games, and others. –
http://a3wasteland.com/
GNU Affero General Public License v3.0
39 stars 79 forks source link

Problems with A3W_fnc_MP #48

Closed IvanMMM closed 9 years ago

IvanMMM commented 9 years ago

Let's start from the beginning. I have script for locking vehicle. It was working fine before 9h, but now I have some really strange problems with it. If I understand right, we can't execute code directly since now, only from functions "A3Wfnc" or "mfremote". So, I implemented this functions and calling them with '[[netId _vehicle], "mf_remote_lock", _vehicle] call A3W_fnc_MP;', but I got nothing... Well, I went to fn_MPexec.sqf and placed some diag_logs. And then I was really amazed, because nearly all vanilla client functions had triggered ' isnil "_function" 'check. But vanilla functions works fine (magic), mine not. I had only one time this function and check was working fine, but I can't repeat it. Is it just "arma feature" and I did sth wrong or this whitelist check behavior is really strange?

Scripts: my init.sqf: http://pastebin.com/eRPLBM1r edited fn_MPexec.sqf: http://pastebin.com/raw.php?i=ZR9M5XTq

AgentRev commented 9 years ago

http://forums.a3wasteland.com/index.php?topic=585.msg3560#msg3560

IvanMMM commented 9 years ago

Thx, it looks easier, I think I'l follow your advice, bit it doesn't explain behavior of this if-statement.

AgentRev commented 9 years ago

Because they need to be compiled where you're actually calling them, hence why your init should be called from globalCompile.sqf, but yeah the thing I posted on the forum is much cleaner

IvanMMM commented 9 years ago

Oh, I got it. This script lang will make me crazy :) Sorry for bothering you.