Base64 and render.Capture not working

I run this the following code and AQID gets printed into my console instead of some long text like it should be. Not sure what I’m doing wrong.




	local info = {
		format = "jpeg",
		h = ScrH(),
		w = ScrW(),
		quality = 75,
		x = 0,
		y = 0
	}

	local send = util.Base64Encode( render.Capture( info ) )
	print( send )



The code you posted works perfectly. Where are you calling it?

If you have it loose in a file it like you posted it, it may run before the player is completely in the game. I just pasted it into a file, autorefreshed, and it worked fine. Make sure it’s called on the client after they’re 100% in game or put it in a console command and try testing that way.

I’m using lua_openscript_cl after I spawn so everything should be loaded, I’ll try using lua_run_cl even though it probably won’t make a difference.

yeah not sure why it works now though…