CSUnderground / backend

CS Underground's Backend
2 stars 1 forks source link

CSUnderground is down #20

Closed smj-edison closed 6 years ago

smj-edison commented 6 years ago

I think I crashed csunderground. These are things I did:

Code here:

var getCode = function() {
    return window.parent.liveEditor.editor.editor.getValue();
};

var setCode = function(code) {
    window.parent.liveEditor.editor.editor.setValue(code);
};

var x = 0;

draw = function() {
    x += 125;

    var code = getCode();

    var pos = code.indexOf("x += ");
    var end = code.substring(pos).indexOf(";") + pos;

    var num = parseInt(code.substring(pos + 5, end));
    num += 1;

    var newCode = code.substring(0, pos + 5) + num + code.substring(end);
    //setCode(newCode);
};
codeHusky commented 6 years ago

No