Author Topic: Torque Script  (Read 3202 times)

also port created murder mystery
port made super murder mystery, the regular murder mystery was made by cucumberdude and computermix.

int main(){
int x = 0;
cout<<"Enter the term ";
cin>>x;   
int answer = 0;

if(x == 1){
cout<<"The "<<x<<" term is 0"<<endl;   
}
else if (x == 2){
cout<<"The "<<x<<" term is 1"<<endl;
}
else{
int first = 0;
int second = 1;
for(int i = 2; i < x; i++){
answer = first + second;
first = second;
second = answer;
}
cout<<"The "<<x<<" term is "<<answer<<endl;
}
return 0;
}

You just spontaneously switched styles completely. GEE.

  • You're now putting your opening braces on the same line as the block definer, instead of their own line.
  • You've suddenly switched to using the standard output instead of printf.
  • You're now putting single-line comparisons inside a code block, instead of as a single line.
  • You're suddenly defining each variable seperately, instead of in a list.
  • Your style of whitespace just changed completely, too.
  • You're now using an inline method instead of using a function.
  • The above is bad practice in general anyway.
  • Probably plagiarized this code too.


Also you forgot the include and using lines.



EDIT: Here's the scoreboard so far for those of you following along at home.

  • Leaves a large amount of whitespace trailing the bottom of the post.
  • Has a sentence fragment standing on its own.
  • Doesn't understand tutorials at all, suggesting a lack of actual coding knowledge.
  • Posts the thread in the wrong subforum.
  • Missing a closing bracket for int Fibonacci
  • No catch case for negative numbers, meaning that calling Fibonacci for all n < 0 causes an infinite loop
  • Used an extra loop variable i when you could've just used c - 1 for input to the fibonacci method
  • Didn't put the increment statement for i after the increment statement for c
  • Coded the Fibonacci method in such a way that it will recurse 2n+1 times
  • You signed up in July of 2013, and your first post was in March of 2014.
  • Your profile page has no useful information on you at all.
  • Your second post was spam which ANYONE with an IQ of 100 or higher would know is bannable on EVERY forum.
  • Your claim of depression is probably a tactic to get sympathy.
  • You blatantly steal other people's code.
  • You're now putting your opening braces on the same line as the block definer, instead of their own line.
  • You've suddenly switched to using the standard output instead of printf.
  • You're now putting single-line comparisons inside a code block, instead of as a single line.
  • You're suddenly defining each variable seperately, instead of in a list.
  • Your style of whitespace just changed completely, too.
  • You're now using an inline method instead of using a function.
  • The above is bad practice in general anyway.
  • Plagiarized this code too.
  • Can't even plagiarize code well - dropped an include and using.
  • "Too lazy" to post code that every programmer knows and can recreate in thirty seconds, yet not too lazy to continually reply to this thread to dig yourself deeper.
« Last Edit: April 04, 2014, 07:04:47 PM by Xalos »

I was to lazy to post my own code, I was busy doing homework.

  • "Too lazy" to post code that every programmer knows and can recreate in thirty seconds, yet not too lazy to continually reply to this thread to dig yourself deeper.

I am one who makes immediate responses to retorts.
Massachusetts is my heritage I would expect nothing less from myself.

I am one who makes immediate responses to retorts.
Massachusetts is my heritage I would expect nothing less from myself.

What

I am one who makes immediate responses to retorts.
Massachusetts is my heritage I would expect nothing less from myself.

That doesn't actually disprove what I said. At all. Also you didn't put a comma between heritage and I. Not noteworthy enough to add to the list, but still.

I'm "too lazy" to make the user input part.
Code: [Select]
#include <iostream>
using namespace std;

int fib(int);

int main()
{
    return 0;
}

int fib(int n)
{
    //Yes, doing it without recursion is just that easy.
    if(n < 0) return -1;
    if(n == 0) return 0;
    if(n == 1) return 1;
    int prev0 = 0;
    int prev1 = 1;
    int value = 1;
    for(int i = 2; i < n; i++)
    {
        prev0 = prev1;
        prev1 = value;
        value = prev0 + prev1;
    }
    return value;
}
« Last Edit: April 04, 2014, 07:19:49 PM by Xalos »

Guys, guys. Calm down for a second. This guy is here asking for help learning TS, not to be criticized about his coding abilities in other languages. Think for a minute if you're in his position, you're probably expecting responses exactly like the ones he's received where you're going to get insulted and torn apart for not being able to figure it out. The guy simply padded his resume, and maybe for you that's a deal breaker but after degrading his coding ability and intelligence he's still going to be left high and dry with no more of an idea how to code. Maybe you could try actually helping the guy learn instead of yelling at him for trying to seem like he knew something, huh?

OP: Come up with an idea of something you want to make in Blockland. If you don't know where to start, that's fine, just post a topic in the Coding Help subforum that explains what you want to make and ask how you might go about doing this. Dozens of people will step in to help you, this forum is the single biggest resource for TorqueScript help on the entire internet. You don't need to defend your coding knowledge or intelligence when you ask for help, everybody needs help at some point or another and even the best coders still ask other coders questions.

-snip-

Padding your résumé will get you fired in real life. In my opinion, it's far better to admit you know nothing about a subject than to try to make it seem like you do. If he had come right out and said "I do not know how to code, please help me learn" then I wouldn't have been tearing apart his statements in the first place.

Padding your résumé will get you fired in real life. In my opinion, it's far better to admit you know nothing about a subject than to try to make it seem like you do. If he had come right out and said "I do not know how to code, please help me learn" then I wouldn't have been tearing apart his statements in the first place.
Maybe for you that's a deal breaker but after degrading his coding ability and intelligence he's still going to be left high and dry with no more of an idea how to code.

Aww, poor him. He plagiarized not one, but two people in trying to ask to learn how to code, got found out, hasn't apologized, and still hasn't learned how to code!

We're such horrible people.

I appreciate the support $trinick.


If he had come right out and said "I do not know how to code, please help me learn" then I wouldn't have been tearing apart his statements in the first place.


Regardless of whether it's right for me to not help him because of that, he is plagiarizing other people's code by implying that it was his own. That's a sign of someone without any integrity. I don't want someone who has no integrity becoming capable of coding in TorqueScript. There are plenty of exploits in just the scripting language of this game that someone with no integrity could easily exploit.

well you guys jumped the gun on insulting him pretty fast

you didn't even try to help him