0

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 
2
  • 1
    Lua prohibits cheating! :-) Commented May 14, 2021 at 20:04
  • Please don't make more work for others by vandalizing your posts. By posting on the Stack Exchange (SE) network, you've granted a non-revocable right, under a CC BY-SA license, for SE to distribute the content (i.e. regardless of your future choices). By SE policy, the non-vandalized version is distributed. Thus, any vandalism will be reverted. Please see: How does deleting work? …. If permitted to delete, there's a "delete" button below the post, on the left, but it's only in browsers, not the mobile app. Commented May 14, 2021 at 21:07

1 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.