View Single Post
Old 05-06-13, 02:39 PM   #23
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

the python file layout controls flow of execution. If something is tabbed more or tabbed less than it should be the python execution engine will throw an error. Your example above would throw an error. If the global ___ is to be part of the function block then it needs to be tabbed the same as the function block.

If you've done any coding in C++ or C# think of the tabs as {}s. Think of the : as function header

C#:

private void myfunction(int a, float b)
{
a = Convert.ToInt32(b);
}

In python:

def myfunction(a, b):
[TAB]a = Convert.ToInt32(b)

Last edited by TheDarkWraith; 05-06-13 at 03:03 PM.
TheDarkWraith is offline   Reply With Quote