02-13-2026, 09:39 AM
@Dbox
I have tried to do a different GetAILevel menu but I got this and I dunno where is the issue!
![[Image: QBJS-error.png]](https://i.ibb.co/HTjgqBqL/QBJS-error.png)
I hve just modded the GetAILevel so:
[qbjs]
levels(1) = "Beginner"
levels(2) = "Easy"
levels(3) = "Intermediate"
levels(4) = "Advanced"
levels(5) = "Expert"
Dim i As Integer, aiLevel as integer
aiLevel = 1
'Print
do
_printstring (200,100)," Select a Difficulty Level" 'Print " Select a Difficulty Level"
For i = 1 To 5
' Print " -> "; i; "- "; levels(i)
if i = aiLevel then color 3, 7 else color 15, 0
_Printstring (200, 100 + (20 *i)), " -> "; i; "- "; levels(i)
Next i
color 15, 0
_printstring (200,220), " Enter Difficulty Level 1-5"
do 'input
if (_keyhit = 32) or (_keyhit = 13) then exit sub
if _keyhit = 18432 then
if aiLevel >1 then
aiLevel = aiLevel -1
exit do
end if
end if
if _keyhit = 20480 then
if aiLevel <5 then
aiLevel = aiLevel +1
exit do
end if
end if
loop
loop
'Print
'Input " Enter Difficulty Level 1-5: ", aiLevel
'If aiLevel > 0 And aiLevel < 6 Then
' valid
' Else
' aiLevel = 1
' Print " Invalid selection, defaulting to level 1"
' Print
' Print " Press any key to continue..."
'Sleep
' End If
[/qbjs]
Thanks for feedbacks
PS: is QBJS button box broken in the forum?
I have tried to do a different GetAILevel menu but I got this and I dunno where is the issue!
![[Image: QBJS-error.png]](https://i.ibb.co/HTjgqBqL/QBJS-error.png)
I hve just modded the GetAILevel so:
[qbjs]
levels(1) = "Beginner"
levels(2) = "Easy"
levels(3) = "Intermediate"
levels(4) = "Advanced"
levels(5) = "Expert"
Dim i As Integer, aiLevel as integer
aiLevel = 1
do
_printstring (200,100)," Select a Difficulty Level" 'Print " Select a Difficulty Level"
For i = 1 To 5
' Print " -> "; i; "- "; levels(i)
if i = aiLevel then color 3, 7 else color 15, 0
_Printstring (200, 100 + (20 *i)), " -> "; i; "- "; levels(i)
Next i
color 15, 0
_printstring (200,220), " Enter Difficulty Level 1-5"
do 'input
if (_keyhit = 32) or (_keyhit = 13) then exit sub
if _keyhit = 18432 then
if aiLevel >1 then
aiLevel = aiLevel -1
exit do
end if
end if
if _keyhit = 20480 then
if aiLevel <5 then
aiLevel = aiLevel +1
exit do
end if
end if
loop
loop
'Input " Enter Difficulty Level 1-5: ", aiLevel
'If aiLevel > 0 And aiLevel < 6 Then
' valid
' Else
' aiLevel = 1
' Print " Invalid selection, defaulting to level 1"
' Print " Press any key to continue..."
'Sleep
' End If
[/qbjs]
Thanks for feedbacks
PS: is QBJS button box broken in the forum?

