Jump to content

Recommended Posts

Posted

How do I use a variable set from a function after the function ends

Func _MakeMsg($iText)
    $Text = $iText
EndFunc

_MakeMsg("Hi")
MsgBox(0,"",$Text)

Line 2 (~File~.au3)

Global $Text = $iText)

Global $Text = ^ERROR

Error: Unbalanced brackets in expression

Posted
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

Posted (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 by weaponx

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...