Jump to content
gokitty1199

hinting passed variable, displaying <no shape>

Recommended Posts

im passing the triggers name from a trigger to a script and then passing the same variable from that script using publicVariableServer. this was working earlier today before i started to rewrite how the triggers spawn but the file that is getting the variable passed to it was not changed which makes no sense to me as to why it is throwing the error. here is the function that creates the trigger and passes the name into register.sqf. you can see r1Trigger is getting passed into register.sqf, now if i pass the name as a string it works just fine such as "cash1 = player addAction ['register 1', {['r1Trigger'] execVM 'server\loot\register.sqf';}];"  but even if i use call compile to turn it back into the name of the object in the script, it still throws <no shape> when i hint the name.

_area = [0.462, 0.637, 10.650, true, 1];

makeTrig1Fnc =
{
	_pos = [3119, 6303.5, 0.312];
	
	r1Trigger = createTrigger ["EmptyDetector", [_pos select 0, _pos select 1, _pos select 2]];
	r1Trigger setTriggerArea [_area select 0, _area select 1, _area select 2, _area select 3, _area select 4];
	r1Trigger setTriggerActivation ["GUER", "PRESENT", true];
	r1Trigger setTriggerStatements ["this && player in thisList", 
	"cash1 = player addAction ['register 1', {[r1Trigger] execVM 'server\loot\register.sqf';}];", 
	"player removeAction cash1;"];
};

here is the register.sqf

_register = _this select 0;

_h = [_register]spawn
{
	_register = (_this select 0);
	hint str _register;//THIS IS WHERE IM TRYING TO PRINT THE HINT FOR TESTING REASONS
	_register1 = r1Trigger;
	_register2 = r2Trigger;
	_register3 = r3Trigger;
	_register4 = r4Trigger;

	_moneyAmount = selectRandom [50, 100, 150, 175, 200, 250, 275, 400, 325, 2000];

	switch (_register) do
	{
		case _register1: 
		{
			registerUsed = [_register];
			publicVariableServer "registerUsed";
			player removeAction cash1;
			award = award + _moneyAmount;
			//hint format ["You found %1 dollars. Amount Stolen: $%2", _moneyAmount, award];
			[r1SoundPos, ["cashRegister", 125, 1]] remoteExec ["say3d", 0, true];
			_register setPos [0, 0, 0];
		};
        };
};

the other strange thing is that it works inside the switch statement and it runs for _register1 and _register2(the rest not included to keep the post size down) but long story short, it just works. but when i try to pass it to the server with publicVariableServer, that is where i run into the problems. when it was hinting the name properly, thats when it was working fine and i was able to work on the registerUsed eventHandler, why is it printing out <no slot>, ive restarted my game and everything and it just makes no sense to me as to why its doing this.

Share this post


Link to post
Share on other sites

"No shape" isn't an error, you get your object just fine , so I don't understand your problem. 

You can hint other params by the way 

hint str [
    _register,
    triggerType _register,
    triggerArea _register,
    triggerActivation _register,
    triggerStatements _register,
    triggerTimeout _register,
    triggerActivated _register,
    list _register,
    triggerAttachedVehicle _register
];

 

  • Thanks 1

Share this post


Link to post
Share on other sites

"No shape" is the model name for triggers.

  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, xjoker_ said:

"No shape" isn't an error, you get your object just fine , so I don't understand your problem. 

You can hint other params by the way 


hint str [
    _register,
    triggerType _register,
    triggerArea _register,
    triggerActivation _register,
    triggerStatements _register,
    triggerTimeout _register,
    triggerActivated _register,
    list _register,
    triggerAttachedVehicle _register
];

 

 

4 hours ago, Tankbuster said:

"No shape" is the model name for triggers.

oh that i did not know, i thought it was having issues passing it through because early on in the missions development it was printing out the variable name of the trigger just fine but suddenly stopped and i had no clue what no shape meant. thanks guys

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×