Skip to content

Commit

Permalink
Activo el anti doble cliente
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyr0X committed Jul 15, 2021
1 parent b41fbcc commit 86de45e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions CODIGO/General.bas
Original file line number Diff line number Diff line change
Expand Up @@ -1031,14 +1031,14 @@ Sub Main()

#If DEBUGGING = 0 Then

'If Not RunningInVB Then
If Not RunningInVB Then

' If FindPreviousInstance Then
' Call MsgBox("¡Argentum Online ya esta corriendo! No es posible correr otra instancia del juego. Haga clic en Aceptar para salir.", vbApplicationModal + vbInformation + vbOKOnly, "Error al ejecutar")
' End
'End If
If FindPreviousInstance Then
Call MsgBox("¡Argentum Online ya esta corriendo! No es posible correr otra instancia del juego. Haga clic en Aceptar para salir.", vbApplicationModal + vbInformation + vbOKOnly, "Error al ejecutar")
End
End If

'End If
End If

#End If

Expand Down
8 changes: 4 additions & 4 deletions CODIGO/PrevInstance.bas
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Private Function CreateNamedMutex(ByRef mutexName As String) As Boolean
Exit Function

CreateNamedMutex_Err:
Call RegistrarError(Err.number, Err.Description, "PrevInstance.CreateNamedMutex", Erl)
Call RegistrarError(Err.Number, Err.Description, "PrevInstance.CreateNamedMutex", Erl)
Resume Next

End Function
Expand All @@ -74,7 +74,7 @@ Public Function FindPreviousInstance() As Boolean
'
'***************************************************
'We try to create a mutex, the name could be anything, but must contain no backslashes.
If CreateNamedMutex("UniqueNameThatActuallyCouldBeAnything") Then
If CreateNamedMutex("EnVezDeChitearAyudanos!HablanosAlDiscord") Then
'There's no other instance running
FindPreviousInstance = False
Else
Expand All @@ -87,7 +87,7 @@ Public Function FindPreviousInstance() As Boolean
Exit Function

FindPreviousInstance_Err:
Call RegistrarError(Err.number, Err.Description, "PrevInstance.FindPreviousInstance", Erl)
Call RegistrarError(Err.Number, Err.Description, "PrevInstance.FindPreviousInstance", Erl)
Resume Next

End Function
Expand All @@ -111,7 +111,7 @@ Public Sub ReleaseInstance()
Exit Sub

ReleaseInstance_Err:
Call RegistrarError(Err.number, Err.Description, "PrevInstance.ReleaseInstance", Erl)
Call RegistrarError(Err.Number, Err.Description, "PrevInstance.ReleaseInstance", Erl)
Resume Next

End Sub

0 comments on commit 86de45e

Please sign in to comment.