Sign in to follow this  
Followers 0
qwertylol

Huh?

2 posts in this topic

http://www.autoitscript.com/fileman/users/AutoIt%20Smith/AutoIt%20Server%20Update%201.au3

Global $PRIORITYQUEUE_ITEM = ""
Global Enum $DELAY_AFTERPREV = 0, $DELAY_FROMNOW = 1
Global Const $PRIORITYQUEUE_DEFAULTLIMIT = 100
Global Const $PRIORITYQUEUE_FIRSTITEM = 2
Global Const $PRIORITYQUEUE_NEGATIVEPOINTER = $PRIORITYQUEUE_FIRSTITEM - 1
; Only edit the 4 commented variables.
Global Const $Port = 8000; Set your port here.
Global Const $MaxLength = 512; Maximum message length.
Global Const $MaxConnection = 100; Maximum user connections
Global Const $Prefix = Chr(0); Server stream prefix.  (EDIT IN CLIENT AS WELL)
Global $Queue = _PriorityQueueCreate()
Global $MainSocket = TCPStartServer($Port, ($MaxConnection + 1))
If @error <> 0 Then Exit MsgBox(16, "Error", "Server unable to initialize.")
Global $ConnectedSocket[ ($MaxConnection + 1) ]
Global $CurrentSocket = 0
Local $Track = 0
Local $Data
For $Track = 0 To $MaxConnection Step 1
    $ConnectedSocket[$Track] = -1

this is the top part of:

http://www.autoitscript.com/fileman/users/AutoIt%20Smith/AutoIt%20Server%20Update%201.au3

For $Track = 0 To $MaxConnection Step 1

$ConnectedSocket[$Track] = -1

How in the world can this command reach $ConnectedSocket[$Track] = -1

If it counts up to

Global Const $MaxConnection = 100

?

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/fileman/users/AutoIt%20Smith/AutoIt%20Server%20Update%201.au3

Global $PRIORITYQUEUE_ITEM = ""
Global Enum $DELAY_AFTERPREV = 0, $DELAY_FROMNOW = 1
Global Const $PRIORITYQUEUE_DEFAULTLIMIT = 100
Global Const $PRIORITYQUEUE_FIRSTITEM = 2
Global Const $PRIORITYQUEUE_NEGATIVEPOINTER = $PRIORITYQUEUE_FIRSTITEM - 1
; Only edit the 4 commented variables.
Global Const $Port = 8000; Set your port here.
Global Const $MaxLength = 512; Maximum message length.
Global Const $MaxConnection = 100; Maximum user connections
Global Const $Prefix = Chr(0); Server stream prefix.  (EDIT IN CLIENT AS WELL)
Global $Queue = _PriorityQueueCreate()
Global $MainSocket = TCPStartServer($Port, ($MaxConnection + 1))
If @error <> 0 Then Exit MsgBox(16, "Error", "Server unable to initialize.")
Global $ConnectedSocket[ ($MaxConnection + 1) ]
Global $CurrentSocket = 0
Local $Track = 0
Local $Data
For $Track = 0 To $MaxConnection Step 1
    $ConnectedSocket[$Track] = -1
this is the top part of:

http://www.autoitscript.com/fileman/users/AutoIt%20Smith/AutoIt%20Server%20Update%201.au3

For $Track = 0 To $MaxConnection Step 1

$ConnectedSocket[$Track] = -1

How in the world can this command reach $ConnectedSocket[$Track] = -1

If it counts up to

Global Const $MaxConnection = 100

?

Oh never mind, it is to fill in the array from [1] to [100] with -1

please delete this thread :shocked:

Share this post


Link to post
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
Sign in to follow this  
Followers 0