let experience = rows[0].exp; let level = rows[0].level; if (level === null || !level) { level = 0; } let amountToNextLevel = 0; if (level === 0) { let smthLol = experience/1000; amountToNextLevel = 1 + smthLol; } else if (level === 1) { let smthLol = experience/4000; amountToNextLevel = 1 + smthLol; } else if (level === 2) { let smthLol = experience/16000; amountToNextLevel = 1 + smthLol; } else if (level === 3) { let smthLol = experience/32000; amountToNextLevel = 1 + smthLol; } else if (level === 4) { let smthLol = experience/64000; amountToNextLevel = 1 + smthLol; } else if (level === 5) { let smthLol = experience/128000; amountToNextLevel = 1 + smthLol; } else if (level === 6) { let smthLol = experience/256000; amountToNextLevel = 1 + smthLol; } else if (level === 7) { let smthLol = experience/512000; amountToNextLevel = 1 + smthLol; } else if (level === 8) { let smthLol = experience/1024000; amountToNextLevel = 1 + smthLol; } else if (level === 9) { let smthLol = experience/2048000; amountToNextLevel = 1 + smthLol; } else if (level === 10) { let smthLol = experience/4096000; amountToNextLevel = 1 + smthLol; } else if (level === 11) { let smthLol = experience/8192000; amountToNextLevel = 1 + smthLol; } else if (level === 11) { let smthLol = experience/16384000; amountToNextLevel = 1 + smthLol; } else { amountToNextLevel = 2; } ctx.fillStyle = "#66fff5"; ctx.font = '200px "SourceSans"'; ctx.fillText(level, 1875, 361); ctx.strokeStyle = "#66fff5"; ctx.lineWidth = 10; ctx.beginPath(); console.log("experience: " + experience); ctx.arc(1926, 300, 125, 0, (amountToNextLevel - 1) * 10); ctx.stroke();