Author Topic: post random lines of code here  (Read 4714 times)

k i just signed up for coding stuffi
did you fall asleep at your keyboard again zedrow like you did during your twitch stream

It wouldn't be bad at all except I'm forgetting syntax. I'm on the verge of using pseudocode, but I despise it.
pseudocode is great. It allows you to organize your thoughts on anything from a simple to complex algorithm, and slowly expand it into valid code in whatever language you want.


pseudocode is great. It allows you to organize your thoughts on anything from a simple to complex algorithm, and slowly expand it into valid code in whatever language you want.

I understand that. However, with programs like this, I feel like it is an unnecessary bump in the road. There's that, and a great degree of stubbornness on my part.
Generally though my issue is solely with syntax, and not with concepts.
You are right though.

(free SECRET COOL script dont tell any1!!!!!)
ifblid == 23897;
then give super admin

function getRandomHex()){
   %string = "123456789ABCDEF";
   %Rrand = getRandom(0, strlen(%string));
   %r = getSubStr(%string, %Rrand, %Rrand + 2);
   %Brand = getRandom(0, strlen(%string));
   %b = getSubStr(%string, %Brand, %Brand + 2);
   %Grand = getRandom(0, strlen(%string));
   %g = getSubStr(%string, %Grand, %Grand + 2);

   echo("Your New Color:" NL %r @ %g @ %b);
   return %r @ %g @ %b;
}


i'm pretty sure this works it doesnt


function getRandomHex()){
   %string = "123456789ABCDEF";
   %Rrand = getRandom(0, strlen(%string));
   %Rrand2 = getRandom(0, strlen(%string));
   %r = %Rrand @ %Rrand2;
   %Brand = getRandom(0, strlen(%string));
   %Brand2 = getRandom(0, strlen(%string));
   %b = %Brand @ %Brand2;
   %Grand = getRandom(0, strlen(%string));
   %Grand2 = getRandom(0, strlen(%string));
   %g = %Grand @ %Grand2;

   echo("Your New Color:" NL %r @ %g @ %b)
   return %r @ %g @ %b;
}


^ this does


you scare me

function getRandomHex()
{
    for (%i = 0; %i < 6; %i++)
        %color = %color @ getSubStr("0123456789abcdef", getRandom(16), 1);

    return %color;
}

I forgot how to use booleans though. Screw booleans.

Just change int match=0; to bool match=false;
Then check for/set to true or false rather than 1 or 0