spinter Posted May 20, 2013 Posted May 20, 2013 I have this problem I would need to use a global variable, if I use DoScript works! Start mix -- Variabiles do pippo = 1 end Continus do trigger.action.outText(pippo, 5) pippo = pippo + 1 end but if I put them in two separate lua file and use the Script File Do me an error, how can I use? Can I use my boolean variables? ====VIAF==== Spinter 155° "Pantere Nere" TsSimComms My Site aiupgrade.net
TeTeT Posted May 21, 2013 Posted May 21, 2013 I don't know about the scoping rules in DCS lua between scripts, but for sharing an int value you can use any flag. If you follow the flag approach, I recommend writing a set and get function for it with a telling name (e.g. getPippo, setPippo).
spinter Posted May 21, 2013 Author Posted May 21, 2013 I can not understand why when I write code in DoScript works! and if I use DoScriptFile does not work can you help me? ====VIAF==== Spinter 155° "Pantere Nere" TsSimComms My Site aiupgrade.net
spinter Posted May 21, 2013 Author Posted May 21, 2013 None please!! ====VIAF==== Spinter 155° "Pantere Nere" TsSimComms My Site aiupgrade.net
Grimes Posted May 21, 2013 Posted May 21, 2013 Are you 100% sure that your script file is running for it to set the global variable? The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
spinter Posted May 22, 2013 Author Posted May 22, 2013 Solved!! Global variabiles.lua load by once if load wiht mission Start Give error!!! ====VIAF==== Spinter 155° "Pantere Nere" TsSimComms My Site aiupgrade.net
Recommended Posts