MoonMan
MoonMan

Reputation: 1

Lua error attempt to index global nil value csgo

So im trying to code a lua for a csgo related software but for some reason its giving me this error

Exception has occurred: attempt to index a nil value (global 'cheat')
stack traceback:
    c:/Users/trist/Desktop/prediction.lua:3: in main chunk
    [C]: in ?
    --Hope
local checkhitbox = {0,11,12,13,14}
local username = cheat.GetCheatUserName()
local ideal_yaw
local right_side
local left_side
local dt_charging 
print("" .. username .. " if you have any questions feel free to dm kib1336#1030")
print("" .. username .. " if you have any suggestion or found any bug feel free to join our discord! : https://discord.gg/pJ5WpMV")
local version = "1643"
 --This is the start of the code for the lua 

Upvotes: 0

Views: 997

Answers (1)

Paul Kulchenko
Paul Kulchenko

Reputation: 26744

I think the error message you are getting is quite clear: the value of the global cheat variable is nil, but you attempt to index it (to get the value of GetCheatUserName). You may need to check where you expect the assignment to cheat happen (possibly by loading an external module with require).

Upvotes: 1

Related Questions