Ok so for my gamemode I need it to loop through all players and get the string that it stored for them after 100 seconds. Here is the code I have for storing the variable in cl_init.lua:
button = vgui.Create( “DButton”, frame )
button:SetPos( 200, 600)
button:SetSize( 100, 50 )
button:SetText( “Male” )
button.DoClick = function()
frame:SetVisible( false )
and here is what i put to read the variables in init.lua:
for k, v in pairs(player.GetAll()) do v:ChatPrint(v:GetNWString(gender)) end
timer.Simple( 100, ReadGender )
I understand that this code may be completely wrong but I’m new to Lua so please help.
I also get no errors.