<eof> expected near 'end'



help pls

Without seeing the whole file, it’s hard to know for sure, but FROM EXPERIENCE, you’re missing another ‘end’ (maybe more).

BUT you have to be careful that the ‘end’ you’re missing isn’t the last one.

Start tracing visually with your eyes, start with the first instance of “if,” “for,” “while,” “do,” or “function” (I may be missing more), but for EACH ONE, you should see a corresponding ‘end’

Think of it as opening and closing a door.

  • For each time you open the door “if statement,” you have to close it once you’re done ‘end.’
  • For each time you open the door “for loop,” you have to close it once you’re done ‘end.’
  • For each time you open the door “while loop,” you have to close it once you’re done ‘end.’

You should have an equal amount of each type and “end’s”

If you’re still stuck after trying to find it, please post your code

cl_gangrobbery.lua (4.2 KB)
idk

Ran through OneCompiler fine after setting RegisterNetEvent and Citizen equal to some value…

1 Like

the error is from jengijoib/ck/cl_main.lua, not some cl_gangrobbery.lua.

Further, do what Wetter42 said:

1 Like

cl_main.lua (15.2 KB)

Youre not missing an end youre missing the start of a thread

local talliauki = false
--made by karpo#1943

	Wait(4000) --4sec aikaa initiatee ennenku haetaan minkäänlaist dataa
	PlayerData = ESX.GetPlayerData()
	Wait(1000)
	check() --checkataan onko jobilla jengiä
	Wait(50)
	blippi()
	while true do
		local wait =

Your code goes directly from a variable set to a while true, and the “end” for that while loop is followed by another “end)” which is the end for threads or event functions.

The file is expecting like

local talliauki = false
--made by karpo#1943
Citizen.CreateThread(function()
	Wait(4000) --4sec aikaa initiatee ennenku haetaan minkäänlaist dataa
	PlayerData = ESX.GetPlayerData()
	Wait(1000)
	check() --checkataan onko jobilla jengiä
	Wait(50)
	blippi()
	while true do
		local wait =
2 Likes