There are a couple errors. The first is that the `while` keyword must be lowercase. Also within the `while` loop the if statement is missing the `end` keyword. I believe you'll also need to require the libraries you need before using them in a definition.
local component = require "component"
local sides = require "sides"
local redstone = component.redstone
local reactor = component.nc_fission_reactor
local function GP()
return reactor.getEnergyStored()
end
local mP, MP = 4000, reactor.getMaxEnergyStored()
local MMP, CP = (MP / 4) * 3, GP()
while CP > 0 do
if CP > MMP then