29.12.2010, 20:43
This is an example for recursion:
As you see, the function calls itself - in this case for ever. So the compiler does not know, how much ram this will need, as there are new variables in every call, and the old ones do not get deleted.
Recursions itself are a nice scripting method, as long as you use them correctly and end them at some point. So the compiler message does not have to be bad.
Check your script for a function that calls itself, and you got the reason for that message.
pawn Код:
Recursion(number)
{
new next_number = number + 1;
Recursion(next_number);
}
// Will be executed like this
Recursion(number)
{
new next_number = number + 1;
{
new next_number_2 = next_number + 1;
{
new next_number_3 = next_number_2 + 1;
{
//...
}
}
}
}
Recursions itself are a nice scripting method, as long as you use them correctly and end them at some point. So the compiler message does not have to be bad.
Check your script for a function that calls itself, and you got the reason for that message.