Jump to content
Sign in to follow this  
Spriterfight

HELP I need something that checks if a ticket reaches an maount

Recommended Posts

this dosent work

 

if (isServer)  then {

if ([WEST] call BIS_fnc_respawnTickets) < 99) then
{
  hint "good luck"
};
 

  • Confused 1

Share this post


Link to post
Share on other sites

Doesn't work at what context? You apparently forget the bracket to close if statement.

  • Like 1

Share this post


Link to post
Share on other sites
Just now, Spriterfight said:

if the west side's tickets are lower than 99 it dosent activates hint

I know. It is actually broken code so never runs, however don't you have more informations, like how do you execute it, any errors, etc? Saying just “THIS DOESNT WORK!!!!!!!!!” never helps you.

  • Like 1

Share this post


Link to post
Share on other sites

it is in the init.sqf file..I checked the log it doesnt 

does not write about  the script 

Share this post


Link to post
Share on other sites

Well, as @POLPOX said you haven't closed your statement:

 

if (isServer)  then {
	if ([WEST] call BIS_fnc_respawnTickets) < 99) then
	{
 		hint "good luck"
	};
}; <------------- you didn't have this to close the if...then statement

 

But, being that you are using isServer, if this is on a hosted server then only the host will see the hint, but if it is on a dedicated server then no one will see the hint, as the hint will only show on the server.

  • Thanks 1

Share this post


Link to post
Share on other sites

i solved it i put the [WEST] call BIS_fnc_respawnTickets) < 99 in a trigger  but cant figure out why my if statements dont work

Share this post


Link to post
Share on other sites
29 minutes ago, Spriterfight said:

i solved it i put the [WEST] call BIS_fnc_respawnTickets) < 99 in a trigger  but cant figure out why my if statements dont work

Because init.sqf only executed once, so the if does. Trigger is unlike init.sqf, executed every once in a while.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 minute ago, Spriterfight said:

so dynamic action conditions go to trigger and static actions go to init?

Basically, yes, depends on “dynamic action conditions” and “static actions” you meaning.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, beno_83au said:

Well, as @POLPOX said you haven't closed your statement:

 


if (isServer)  then {
	if ([WEST] call BIS_fnc_respawnTickets) < 99) then
	{
 		hint "good luck"
	};
}; <------------- you didn't have this to close the if...then statement

 

But, being that you are using isServer, if this is on a hosted server then only the host will see the hint, but if it is on a dedicated server then no one will see the hint, as the hint will only show on the server.

Ah the first if...then statememt is closed with the last barcet Am i right?

 

Share this post


Link to post
Share on other sites

when do you want the mission to call upon this script? when someone respawns? or every couple of seconds?

Share this post


Link to post
Share on other sites

When the ticket of the side is bellow 99

I think this action dosent need repetitive scan every seconds but i solved it with a  trigger.Now my problem is thath i want to add the respawning playable ais a waypoint that activates every moment when   they  respawn so it kinda pathfindig  thing ,but i dont want to use ai spawn module because i use mods and dont want to fidget in the spawn module

 

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
Sign in to follow this  

×