Jump to content
Sign in to follow this  
hicks88

here's a game

Recommended Posts

this line is ment to calculate how many wip_m4mags the player has

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">("x == {wip_m4csmag}" count magazines player)'

can anyone spot the problem, knowing me it is something simple that i have overlooked

Share this post


Link to post
Share on other sites

Your "x" should be "_x" :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">("_x == {wip_m4csmag}" count magazines player)

Share this post


Link to post
Share on other sites

still didn't work, here is the error

("_x == {wip_m4csmag}" count magazines |#|player) : error unknown operator player

Share this post


Link to post
Share on other sites

doesn't work

|#|{_x == "wip_m4csmag"} count magazines player : Error Invalid number in expression

Share this post


Link to post
Share on other sites

It returns a number, if you just put a number somewhere it doesn't work either now does it.

edit... I tried and it works like a charm. Like this for example:

hint format ["%1", {_x == "M16"} count magazines player]

Share this post


Link to post
Share on other sites

Yes, this expression returns a number so you can use it as a condition, for example in the condition line of a trigger !

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x == "wip_m4csmag"} count magazines player <= 1

will check if it remains less than 2 magazines in the player's pocket !

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  

×