marcusm 0 Posted November 5, 2003 Hi! inspired of some dynamic-weather topics in the past months, i'm trying to write my own dynamic weather script for MP missions. Here it is: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> changetime=0 #start ~changetime+30 ;servercode ?!(local server) : goto "wait" changetime=1200+(random 1200) weather=random 1 ?(weather >= .52) : goto "foghigh" ?(weather < .52) : goto "foglow" #foghigh fog=.44+(random .41) goto "continue" #foglow fog=.075+(random .25) goto "continue" #continue ;here the problem starts... publicVariable "changetime" publicVariable "weather" publicVariable "fog" #wait ;code executed on all machines... @(changetime != 0) ~1 changetime setOvercast weather changetime setFog fog goto "start" #end exit and now my problem: when the three variables (changetime, weather and fog) shall be declared as public variables, i get the "unknown operator"-message. Does anybody know why? Thank you all very much for your help! Share this post Link to post Share on other sites
RED 0 Posted November 5, 2003 I just ran your script and didn't get any errors? You might want to do this though: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #start changetime=0 RED Share this post Link to post Share on other sites
marcusm 0 Posted November 5, 2003 Thank you for your time, RED! I just found the bug, it was my init.sqs! : In the init.sqs i wrote: publicVariable = "variable" instead of publicvariable "variable"... hmm, it was just a stupid/small mistake so i hope that i didn't cause too much excitement just because of this... Greetings! Share this post Link to post Share on other sites
RED 0 Posted November 5, 2003 It is fine If you are interested, the ECP has a random weather script included that can be altered to suit mission editors needs. The ECP can be found here. Good luck with your mission marcusm. RED Share this post Link to post Share on other sites
marcusm 0 Posted November 5, 2003 ...sounds interesting, i'll have a look at ECP. Thank you again for your time! Greetings ! Share this post Link to post Share on other sites