AcidCorps Posted August 16, 2007 Share Posted August 16, 2007 How do I use a variable set from a function after the function endsFunc _MakeMsg($iText) $Text = $iText EndFunc _MakeMsg("Hi") MsgBox(0,"",$Text)Line 2 (~File~.au3)Global $Text = $iText)Global $Text = ^ERRORError: Unbalanced brackets in expression Link to comment Share on other sites More sharing options...
karman Posted August 16, 2007 Share Posted August 16, 2007 Make it a Global variable Global $Text on top Link to comment Share on other sites More sharing options...
AcidCorps Posted August 16, 2007 Author Share Posted August 16, 2007 Func _MakeMsg($iText) Global $Text = $iText) EndFunc _MakeMsg("Hi") MsgBox(0,"",$Text) Same error Link to comment Share on other sites More sharing options...
Toady Posted August 16, 2007 Share Posted August 16, 2007 Func _MakeMsg($iText) Global $Text = $iText) EndFunc _MakeMsg("Hi") MsgBox(0,"",$Text)oÝ÷ Ù&¦yê뢿êº^.)Þ· !jƧ{kiºÚqæ¶ÚÖíÁת޶¯j¸nW¨ºÚ¶ºw-Ú² hm©ZºÚ"µÍÛØ[ ÌÍÕ^[ÈÓXZÙSÙÊ ÌÍÚU^ BIÌÍÕ^H ÌÍÚU^[[ÂÓXZÙSÙÊ ][ÝÒI][ÝÊBÙÐÞ ][ÝÉ][ÝË ÌÍÕ^ www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
weaponx Posted August 16, 2007 Share Posted August 16, 2007 (edited) Just return it. Func _MakeMsg($iText) $Text = $iText Return $Text EndFunc MsgBox(0,""_MakeMsg("Hi"))oÝ÷ ÚÚºÚ"µÍ[ÈÓXZÙSÙÊ ÌÍÚU^ BÌÍÕ^H ÌÍÚU^] ÌÍÕ^[[ÂÌÍÕ^HÓXZÙSÙÊ ][ÝÒI][ÝÊBÙÐÞ ][ÝÉ][ÝË ÌÍÕ^ Edited August 16, 2007 by weaponx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now