[SOLVED!] Why does my code error?

Function 0 (??):
GETTABLEKS R1 R0 K0 ['AccountAge']
LOADK R2 K1 ['15']
JUMPIFNOTLT R1 R2 L0
LOADK R3 K2 ['you are too young for this game']
NAMECALL R1 R0 K3 ['Kick']
CALL R1 2 0
L0: RETURN R0 0

Function 1 (??):
GETGLOBAL R0 K0 ['game']
LOADK R2 K1 ['Players']
NAMECALL R0 R0 K2 ['GetService']
CALL R0 2 1
GETTABLEKS R1 R0 K3 ['PlayerAdded']
REMARK allocation: closure with 0 upvalues
NEWCLOSURE R3 P0
NAMECALL R1 R1 K4 ['Connect']
CALL R1 2 0
RETURN R0 0

Why does my code error :pleading_face:

This must be a troll #help-and-feedback:scripting-support topic.

Sorry, im new to luau. I dont understand why this code gives me an error.

Maybe another compiled version helps, I don’t know.

; skipping 253 bytes of outlined helpers
; function($arg0) line 3
; align 32 using ud2
# bb_bytecode_0:                                              ; useCount: 0
; successors: bb_fallback_2, bb_fallback_2, bb_3
; in regs: R0
; out regs: R0, R1
.L11:
GETTABLEKS R1 R0 K0 ['AccountAge']
any <- any, string
#   CHECK_TAG R0, ttable, bb_fallback_2                       ; %1
 cmp         dword ptr [r14+0Ch],6
 jne         .L12
#   %2 = LOAD_POINTER R0                                      ; useCount: 1, lastUse: %3
 mov         rax,qword ptr [r14]
#   %3 = GET_SLOT_NODE_ADDR %2, 0u, K0                        ; useCount: 2, lastUse: %5
 mov         rdx,qword ptr [rax+020h]
 mov         rcx,qword ptr [rsp+038h]
 movzx       ecx,byte ptr [rcx+3]
 and         cl,byte ptr [rax+7]
 shl         ecx,5
 add         rdx,rcx
#   CHECK_SLOT_MATCH %3, K0, bb_fallback_2                    ; %4
 mov         eax,dword ptr [rdx+01Ch]
 and         eax,Fh
 cmp         eax,5
 jne         .L12
 mov         rax,qword ptr [r12]
 cmp         rax,qword ptr [rdx+010h]
 jne         .L12
 cmp         dword ptr [rdx+0Ch],0
 je          .L12
#   %5 = LOAD_TVALUE %3, 0i                                   ; useCount: 1, lastUse: %6
 vmovups     xmm0,xmmword ptr [rdx]
#   STORE_TVALUE R1, %5                                       ; %6
 vmovups     xmmword ptr [r14+010h],xmm0
#   JUMP bb_3                                                 ; %7
#
# bb_3:                                                       ; useCount: 2
; predecessors: bb_bytecode_0, bb_fallback_2
; successors: bb_fallback_5, bb_fallback_5, bb_bytecode_1, bb_4
; in regs: R0, R1
; out regs: R0
.L13:
LOADK R2 K1 ['15']
string <- string, any
#   %10 = LOAD_TVALUE K1                                      ; useCount: 1, lastUse: %11
 vmovups     xmm0,xmmword ptr [r12+010h]
#   STORE_TVALUE R2, %10                                      ; %11
 vmovups     xmmword ptr [r14+020h],xmm0
JUMPIFNOTLT R1 R2 L0
.L14:
#   CHECK_TAG R1, tnumber, bb_fallback_5                      ; %13, extra in: R2
 cmp         dword ptr [r14+01Ch],3
 jne         .L15
#   CHECK_TAG R2, tnumber, bb_fallback_5                      ; %15, extra in: R2
 cmp         dword ptr [r14+02Ch],3
 jne         .L15
#   %17 = LOAD_DOUBLE R2                                      ; useCount: 1, lastUse: %18
 vmovsd      xmm0,qword ptr [r14+020h]
#   JUMP_CMP_NUM R1, %17, not_lt, bb_bytecode_1, bb_4         ; %18
 vucomisd    xmm0,qword ptr [r14+010h]
 jna         .L16
#
# bb_4:                                                       ; useCount: 2
; predecessors: bb_3, bb_fallback_5
; successors: bb_fallback_7, bb_8, bb_9
; in regs: R0
; out regs: R0, R3
.L17:
LOADK R3 K2 ['you are too young for this game']
string <- string, any
#   %22 = LOAD_TVALUE K2                                      ; useCount: 1, lastUse: %23
 vmovups     xmm0,xmmword ptr [r12+020h]
#   STORE_TVALUE R3, %22                                      ; %23
 vmovups     xmmword ptr [r14+030h],xmm0
NAMECALL R1 R0 K3 ['Kick']
.L18:
#   CHECK_TAG R0, ttable, bb_fallback_7                       ; %25, extra in: R3
 cmp         dword ptr [r14+0Ch],6
 jne         .L19
#   %26 = LOAD_POINTER R0                                     ; useCount: 3, lastUse: %35
 mov         rax,qword ptr [r14]
#   %27 = GET_HASH_NODE_ADDR %26, 7726716u                    ; useCount: 3, lastUse: %34
 mov         rdx,qword ptr [rax+020h]
 mov         ebx,1
 mov         cl,byte ptr [rax+6]
 shl         ebx,cl
 dec         ebx
 and         ebx,75E67Ch
 shl         rbx,5
 add         rdx,rbx
#   JUMP_SLOT_MATCH %27, K3, bb_8, bb_9                       ; %28
 mov         ecx,dword ptr [rdx+01Ch]
 and         ecx,Fh
 cmp         ecx,5
 jne         .L20
 mov         rcx,qword ptr [r12+030h]
 cmp         rcx,qword ptr [rdx+010h]
 jne         .L20
 cmp         dword ptr [rdx+0Ch],0
 je          .L20
#
# bb_8:                                                       ; useCount: 1
; predecessors: bb_4
; successors: bb_6
; in regs: R3
; out regs: R1, R2, R3
.L21:
#   STORE_POINTER R2, %26                                     ; %29
 mov         qword ptr [r14+020h],rax
#   STORE_TAG R2, ttable                                      ; %30
 mov         dword ptr [r14+02Ch],6
#   %31 = LOAD_TVALUE %27, 0i                                 ; useCount: 1, lastUse: %32
 vmovups     xmm0,xmmword ptr [rdx]
#   STORE_TVALUE R1, %31                                      ; %32
 vmovups     xmmword ptr [r14+010h],xmm0
#   JUMP bb_6                                                 ; %33
 jmp         .L22
#
# bb_9:                                                       ; useCount: 1
; predecessors: bb_4
; successors: bb_fallback_7, bb_fallback_7, bb_fallback_7, bb_fallback_7, bb_6
; in regs: R0, R3
; out regs: R1, R2, R3
.L20:
#   CHECK_NODE_NO_NEXT %27, bb_fallback_7                     ; %34
 mov         ecx,dword ptr [rdx+01Ch]
 shr         ecx,4
 jnz         .L19
#   %35 = TRY_CALL_FASTGETTM %26, 0i, bb_fallback_7           ; useCount: 2, lastUse: %38
 mov         rdx,qword ptr [rax+010h]
 test        rdx,rdx
 jz          .L19
 test        byte ptr [rdx+3],1
 jnz         .L19
 mov         rax,qword ptr [r15+018h]
 mov         rcx,rdx
 mov         r8,qword ptr [rax+0B50h]
 mov         rdx,0
 call        qword ptr [r13+0B8h]
 test        rax,rax
 jz          .L19
#   %36 = LOAD_TAG %35                                        ; useCount: 1, lastUse: %37
 mov         edx,dword ptr [rax+0Ch]
#   CHECK_TAG %36, ttable, bb_fallback_7                      ; %37
 cmp         edx,6
 jne         .L19
#   %38 = LOAD_POINTER %35                                    ; useCount: 1, lastUse: %39
 mov         rdx,qword ptr [rax]
#   %39 = GET_SLOT_NODE_ADDR %38, 6u, K3                      ; useCount: 2, lastUse: %44
 mov         rax,qword ptr [rdx+020h]
 mov         rcx,qword ptr [rsp+038h]
 movzx       ecx,byte ptr [rcx+01Bh]
 and         cl,byte ptr [rdx+7]
 shl         ecx,5
 add         rax,rcx
#   CHECK_SLOT_MATCH %39, K3, bb_fallback_7                   ; %40
 mov         edx,dword ptr [rax+01Ch]
 and         edx,Fh
 cmp         edx,5
 jne         .L19
 mov         rdx,qword ptr [r12+030h]
 cmp         rdx,qword ptr [rax+010h]
 jne         .L19
 cmp         dword ptr [rax+0Ch],0
 je          .L19
#   %41 = LOAD_POINTER R0                                     ; useCount: 1, lastUse: %42
 mov         rdx,qword ptr [r14]
#   STORE_POINTER R2, %41                                     ; %42
 mov         qword ptr [r14+020h],rdx
#   STORE_TAG R2, ttable                                      ; %43
 mov         dword ptr [r14+02Ch],6
#   %44 = LOAD_TVALUE %39, 0i                                 ; useCount: 1, lastUse: %45
 vmovups     xmm0,xmmword ptr [rax]
#   STORE_TVALUE R1, %44                                      ; %45
 vmovups     xmmword ptr [r14+010h],xmm0
#   JUMP bb_6                                                 ; %46
#
# bb_6:                                                       ; useCount: 3
; predecessors: bb_fallback_7, bb_8, bb_9
; successors: bb_bytecode_1
; in regs: R1, R2, R3
.L22:
CALL R1 2 0
#   INTERRUPT 8u                                              ; %49
 mov         rax,qword ptr [r15+018h]
 cmp         qword ptr [rax+0C58h],0
 jne         .L23
.L24:
#   SET_SAVEDPC 9u                                            ; %50
 mov         rdx,qword ptr [rsp+038h]
 add         rdx,24h
 mov         rax,qword ptr [r15+020h]
 mov         qword ptr [rax+018h],rdx
#   CALL R1, 2i, 0i                                           ; %51
 mov         rcx,r15
 lea         rdx,[r14+010h]
 lea         r8,[r14+040h]
 mov         r9d,0
 call        qword ptr [r13+0188h]
 mov         r14,qword ptr [r15+010h]
 test        byte ptr [rax+3],1
 jnz         .L25
 mov         rcx,qword ptr [rax+018h]
 mov         qword ptr [rsp+030h],rax
 mov         rdx,qword ptr [r15+020h]
 mov         rsi,qword ptr [r15+8]
 movzx       eax,byte ptr [rcx+4]
 shl         eax,4
 lea         rdi,[r14+rax]
.L26:
 cmp         rsi,rdi
 jnb         .L27
 mov         dword ptr [rsi+0Ch],0
 add         rsi,10h
 jmp         .L26
.L27:
 mov         rax,qword ptr [rdx+010h]
 test        byte ptr [rcx+5],1
 jz          .L28
 mov         rax,rsi
.L28:
 mov         qword ptr [r15+8],rax
 mov         rax,qword ptr [rcx+010h]
 mov         qword ptr [rsp+038h],rax
 mov         qword ptr [rdx+018h],rax
 mov         r12,qword ptr [rcx+8]
 mov         rax,qword ptr [rcx+030h]
 test        rax,rax
 jz          .L3
 mov         dword ptr [rdx+024h],4
 jmp         rax
.L25:
 mov         rcx,r15
 call        qword ptr [rax+018h]
 test        eax,eax
 jl          .L4
 mov         rdx,qword ptr [r15+020h]
 lea         rcx,[rdx-028h]
 mov         r14,qword ptr [rcx]
 mov         qword ptr [r15+010h],r14
 mov         qword ptr [r15+020h],rcx
 mov         rax,qword ptr [rcx+010h]
 mov         qword ptr [r15+8],rax
#   JUMP bb_bytecode_1                                        ; %52
#
# bb_bytecode_1:                                              ; useCount: 3
; predecessors: bb_3, bb_fallback_5, bb_6
.L16:
L0: RETURN R0 0
#   INTERRUPT 9u                                              ; %53
 mov         rax,qword ptr [r15+018h]
 cmp         qword ptr [rax+0C58h],0
 jne         .L29
.L30:
#   RETURN R0, 0i                                             ; %54
 lea         rdi,[r14-010h]
 xor         ecx,ecx
 jmp         .L7
#
; skipping 150 bytes of outlined code

It’s as obvious as 1 + 1

This is LuaU:

while your’s is just some random language

I couldn’t understand how to send luau code, it’s compiled version of it.

I wonder if the DevForum is being raided by these people :skull:

1 Like
game.Players.PlayerAdded:Connect(function(player)
    if player.AccountAge < 15 then
        player:Kick('Your account needs to be at least 15 days old')
    end
end)
2 Likes

That seems to fix my problem, thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.