Jump to content

Func..


 Share

Recommended Posts

Is it possible.. to get this in a Func and still work the same?

While 1
    TCPSend ($ConnectedSocket, $szData)
    If Not @error Then
        MsgBox(0, "Succeed:", "Packet Sended")
    Else
        MsgBox(0, "Error:", "Port Is Closed.")
        ExitLoop
    EndIf
WEnd

Thnk :lmao:

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

ehmm.. lol fixed (last time i Tidy'd it said You cant do While/If/Do etc in a Func) strange though :/

Thnk :lmao::ph34r:

It's the other way around, you can't declare a function inside a loop or conditional statement. This would cause errors:

While 1
     Func _Test()
          MsgBox(64, "Test", "Test")
     EndFunc
WEndoÝ÷ Ø­¶¬Â)emçâ殶­sdgVæ2õFW7B¢vÆR¢×6t&÷cBÂgV÷CµFW7BgV÷C²ÂgV÷CµFW7BgV÷C²¢tVæ@¤VæDgVæ0

:geek:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

It's the other way around, you can't declare a function inside a loop or conditional statement. This would cause errors:

While 1
     Func _Test()
          MsgBox(64, "Test", "Test")
     EndFunc
WEndoÝ÷ Ø­¶¬Â)emçâ殶­sdgVæ2õFW7B¢vÆR¢×6t&÷cBÂgV÷CµFW7BgV÷C²ÂgV÷CµFW7BgV÷C²¢tVæ@¤VæDgVæ0oÝ÷ Ûú®¢×§z÷«)Ý
-Ö¥­æÊ+pjÆÞq«¬z'bv{¶»-Z¥{X¡iÙbëaÆ®¶­sdVÇ6Tbb33c¶"ÒgV÷C¶W×ÆSgV÷C²FVà¥vÆR£·vFWfW ¤VæD`¥tVæ@¤bb33c¶"ÒgV÷C¶W×ÆS"gV÷C²FVà¥vÆR£·vFWfW ¤VæF`¥tVæ@£¶Æöær6öFP¥tVæ@ ¤gVæ2ôW×ÆP¤W@¤VæDgVæ

so thats why :lmao:!

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...