cain2001 0 Posted January 23, 2006 I have once again manage to swim out too far and sunk into the deep blue. However the white sharks have not found me yet so there is still time i can make my way back to shore and finish my little project The idea of the script is to use 10 players local "Respect" value and make it to a public one. Showstats.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">~5 #start ~29 ? (p6 == player): respectp6 = respect; publicVariable "respectp6" ? (p7 == player): respectp7 = respect; publicVariable "respectp7" ? (p8 == player): respectp8 = respect; publicVariable "respectp8" ? (p9 == player): respectp9 = respect; publicVariable "respectp9" ? (p10 == player): respectp10 = respect; publicVariable "respectp10" ? (p11 == player): respectp11 = respect; publicVariable "respectp11" ? (p12 == player): respectp12 = respect; publicVariable "respectp12" ? (p13 == player): respectp13 = respect; publicVariable "respectp13" ? (p14 == player): respectp14 = respect; publicVariable "respectp14" ? (p15 == player): respectp15 = respect; publicVariable "respectp15" goto "start" loop.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #lp ~30 Hint format ["%1 Have %2 in Respect",name p6, respectp6]; ~2 Hint format ["%1 Have %2 in Respect",name p7, respectp7]; ~2 Hint format ["%1 Have %2 in Respect",name p8, respectp8]; ~2 Hint format ["%1 Have %2 in Respect",name p9, respectp9]; ~2 Hint format ["%1 Have %2 in Respect",name p10, respectp10]; ~2 Hint format ["%1 Have %2 in Respect",name p11, respectp11]; ~2 Hint format ["%1 Have %2 in Respect",name p12, respectp12]; ~2 Hint format ["%1 Have %2 in Respect",name p13, respectp13]; ~2 Hint format ["%1 Have %2 in Respect",name p14, respectp14]; ~2 Hint format ["%1 Have %2 in Respect",name p15, respectp15]; I tried using respect = respectp6 aswell, but it dosnt seem to matter what way its written. I do know I need 10 players to see all the scrips working, but I cant even see it on myself when being a player. Any thoughts? (this is my last "bug" i need to fix before the map is ready, so I would really be glad if someone could help out! Share this post Link to post Share on other sites
benreeper 0 Posted January 23, 2006 What are you trying to do? So far all of those different Respect variables have the same value; they all equal the respect variable. --Ben Share this post Link to post Share on other sites
cain2001 0 Posted January 23, 2006 The value <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">respect is local and set to be 1000. As players battle to gain as much respect they can get, they will all have diffrent amout of it and thats why i need to make each and one of their values public. All this so I know who have the highest amount of respect after the 2 hour timelimit ATM people only see their own. Share this post Link to post Share on other sites
hardrock 1 Posted January 23, 2006 You can at least simplify the first script (showstats.sqs) Quote[/b] ]~5#start ~29 _i = 6 {if(_x==player) then format [{respect%1=respect; publicVariable "respect%1"},_i]; _i=_i+1} forEach [p6,p7,p8,p9,p10,p11,p12,p13,p14,p15] goto "start" Share this post Link to post Share on other sites
cain2001 0 Posted January 26, 2006 anyone have any ideas? All i need is this last piece to fit and map will be done! Share this post Link to post Share on other sites
hardrock 1 Posted January 26, 2006 Well, I don't really know where your problem lies?! What doesn't work? Try to insert a hint after the ? : statement to find out if it ever gets executed when you're p6 (f.i.). You have to debug it, something doesn't seem to work. Do all the player names exist? Does the script run on all players' computers? etc. Share this post Link to post Share on other sites
cain2001 0 Posted January 26, 2006 the script dosnt understand (or work) so that the local value of respect can become respectp6. I want a respect value for each to become a global one I tried all things i know. EDIT: Might got it to work not sure yet!!! Share this post Link to post Share on other sites