Off Topic > Off Topic
Programming Megathread
<< < (77/241) > >>
BluetoothBoy:

--- Quote from: Foxscotch on January 26, 2016, 10:47:08 AM ---there is no increment operator in python, you have to use x += 1 instead
also, for loops in python give you the item in the list, not the indices. so instead of for z in name2 you'd have to use for z in range(len(name2)), where range is a function that returns a generator that generates a "list" using integers with a length equal to the argument, which in this case is the length of name2
so range(10) generates "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"
range() also has more functionality but that's irrelevant right now

--- End quote ---
Hey, thanks for clarifying this. I think I said this already, but I'm not a python guy. 😛

Also, gonna plug this thing my friend made/is making: http://alicorn.io
Gytyyhgfffff:
i just noticed there isn't any torquescript in the op which is incredibly strange considering that this is a forum for a game that uses torquescript
this is a hello world for ts:


--- Code: ---echo("Hello World!");

--- End code ---
BluetoothBoy:

--- Quote from: Gytyyhgfffff on January 26, 2016, 03:19:33 PM ---i just noticed there isn't any torquescript in the op which is incredibly strange considering that this is a forum for a game that uses torquescript
this is a hello world for ts:


--- Code: ---echo("Hello World!");

--- End code ---

--- End quote ---
Which, coincidentally, is a hello world for a lot of things. XD
Tudoreleu:

--- Quote from: Glass Joe on January 26, 2016, 02:46:28 PM ---in general, you should actually avoid using the "using namespace std" or "using namespace" entirely, for that matter. if you use a function that happens to have the same name as one in std (such as list, string, etc.) then the compiler takes the std version of that function first, leading to very hard to find bugs. it's safer to just prefix all functions in std with "std::"

--- End quote ---

oh yeah

that's something i'm doing for now, at least until i actually learn about other namespaces
Foxscotch:

--- Quote from: ZSNO on January 26, 2016, 03:12:06 PM ---Yes, because everyone uses the console window to code.

--- End quote ---
um, plenty of people still use emacs and vim
even for people who don't, preferring the command line to a gui file browser isn't uncommon
Navigation
Message Index
Next page
Previous page

Go to full version