local mini_version = "" local versio_req = {1,5,0} local parts = {} function reqs_init() local version=sys.version() print(version) for part in string.gmatch(version, "[^.]+") do table.insert(parts, tonumber(part)) end print(parts[1].." "..versio_req[1]) print(parts[2].." "..versio_req[2]) print(parts[3].." "..versio_req[3]) states:next() end function reqs_draw() -- print("LOGO DRAW "..logo_step) -- Seleccionar font i destí -- surf.source(logo_sf) surf.target(0) -- Netejar destí surf.cls(16) draw.text("Es requerix mini "..table.concat(versio_req, "."),20,20,2) end function reqs_end() -- print("LOGO_END") -- game_update = intro_init states:executar("logo") -- surf.free(logo_sf) end function reqs_update() if parts[1]>versio_req[1] then states:next() elseif parts[2]>versio_req[2] then states:next() elseif parts[3]>=versio_req[3] then states:next() else reqs_draw() end if controller:check("ESC") or controller:check("shoot") then sys.quit() end end states:registrar("check-reqs",{reqs_init, reqs_update, reqs_end})