hicks88 0 Posted September 18, 2006 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
ProfTournesol 956 Posted September 18, 2006 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
hicks88 0 Posted September 18, 2006 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
Metal Heart 0 Posted September 18, 2006 {_x == "wip_m4csmag"} count magazines player Share this post Link to post Share on other sites
hicks88 0 Posted September 18, 2006 doesn't work |#|{_x == "wip_m4csmag"} count magazines player : Error Invalid number in expression Share this post Link to post Share on other sites
Metal Heart 0 Posted September 18, 2006 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
ProfTournesol 956 Posted September 18, 2006 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