![]() |
Multiple conditions in one "if" statement - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Multiple conditions in one "if" statement (/thread-9265.html) Pages:
1
2
|
RE: Multiple conditions in one "if" statement - xiphirx - 07-20-2011 (07-20-2011, 06:23 PM)Kyle Wrote:(07-20-2011, 06:14 PM)xiphirx Wrote: Sorry, this is not advanced scripting, you're still at the beginner level. "Excuse you", I was talking to the OP in regards to knowing C++. The first two examples wont accomplish what hes trying to do, have two statements bounded by and be true before executing actions. You should have only shown the third code snippet. I fail to see where I'm being harsh. I'm just being realistic. I would rather not bullshit the OP into thinking hes doing really high level stuff and get his hopes down when he actually does do advanced stuff. Motivation is his issue, not yours. Even if he had alot of C++ knowledge, it wouldn't matter since motivation is a independent feeling. The return statement has no point in the function other than cutting it off early, which will happen when you reach the end anyway. RE: Multiple conditions in one "if" statement - Roenlond - 07-20-2011 I was only referring to more advanced scripting for ME, never did I say that it is the hardest thing to do. I know that it is still very much beginner programming. I only came here to ask a question and I got that answered, motivation isn't an issue. Thanks regardless. RE: Multiple conditions in one "if" statement - nemesis567 - 07-20-2011 (07-20-2011, 06:14 PM)xiphirx Wrote: Sorry, this is not advanced scripting, you're still at the beginner level. Return isn't returning nothing as it can't because we're working on a void function but it stops the code from executing in the same or lower hierarchy levels. For instance he could have the continuation of his function bellow. This is the basics of coding, there is nothing close to intermediate here, there is nothing close to advanced and few things under intermediate levels in amnesia level scripting. RE: Multiple conditions in one "if" statement - xiphirx - 07-21-2011 (07-20-2011, 07:13 PM)Roenlond Wrote: I was only referring to more advanced scripting for ME, never did I say that it is the hardest thing to do. I know that it is still very much beginner programming. I only came here to ask a question and I got that answered, motivation isn't an issue. Thanks regardless. I never stated that what you were trying to do was "the hardest thing to do". I know all you came for was a question, and I'm glad you got it answered, I just didn't want you to follow false information. (07-20-2011, 10:43 PM)nemesis567 Wrote:(07-20-2011, 06:14 PM)xiphirx Wrote: Sorry, this is not advanced scripting, you're still at the beginner level. "return" in that sense is, indeed, returning nothing. It has no use in a void function and is pretty redundant. I know it stops the code from executing, but I would rather not chug returns everywhere, it just looks messy and it can mess with your program flow. To illustrate my point: Code: void function(somevar var) Should be Code: void function(somevar var) Both do the exact same thing, but the latter is less code, and isn't redundant. RE: Multiple conditions in one "if" statement - Ideka - 07-21-2011 Define "advanced". RE: Multiple conditions in one "if" statement - Roenlond - 07-21-2011 Jesus, why are you people getting stuck on "advanced"? I didn't mean advanced per se. I guess it was a poor choice of words. Let's put it this way - something different - all right? RE: Multiple conditions in one "if" statement - DRedshot - 07-21-2011 Quote:Define "advanced".Advanced RE: Multiple conditions in one "if" statement - Ideka - 07-21-2011 (07-21-2011, 11:35 AM)Roenlond Wrote: Jesus, why are you people getting stuck on "advanced"? I didn't mean advanced per se. I guess it was a poor choice of words. Let's put it this way - something different - all right?My point is that nothing is "advanced", because that's relative. Your question was not advanced, but it certainly was about something more advanced than what you are (or were ![]() (07-21-2011, 11:39 AM)DRedshot Wrote:Fair enough.Quote:Define "advanced".Advanced |