next-studio|TheKiller
Unregistered
Код:
if (blah)
{
new shit;
shit = 1;
}
else if (blah2)
{
new shit;
shit = 2;
}
Posts: 1,226
Threads: 217
Joined: Jan 2012
Reputation:
0
if (blah)
{
new shit;
shit = 1;
}
else if (blah2)
{
new shit;
shit = 2;
}
or try to end it with return 1; like
if (blah)
{
new shit;
shit = 1;
return 1;
}
if (blah2)
{
new shit;
shit = 2;
return 1;
}
Posts: 340
Threads: 12
Joined: May 2011
Reputation:
0
That is not how pawno works, there shouldn't be a problem with variables intersecting if they are in their own brackets.
next-studio|TheKiller
Unregistered
if , or else if, cannot be returned or breaked.
@[FSaF]Jarno
use if and else if.
If it still does not work, create the variable outside of the if / else if, and configure it inside of the if / else if.
Posts: 340
Threads: 12
Joined: May 2011
Reputation:
0
they can be returned, that way it will skip the rest of the script like this:
shit = 1;
if (shit == 1) return 1; // This returns 1 so the script below won't be used
ass = 3;
shit = 2;
next-studio|TheKiller
Unregistered
They can be returned, but they will get returned automatically if the string / code / whatever is found / not found / whatever.
And why are you going to use more resources, for the codes which can be removed?
This is just what i think.
Posts: 340
Threads: 12
Joined: May 2011
Reputation:
0
This is not a problem like that, it's some kind of a glitch in pawno. I am a professional scripter and i know it's not a problem with that. (AND, i already tried it)
Posts: 340
Threads: 12
Joined: May 2011
Reputation:
0
Problem solved, (wasn't a problem with the script, the reason for this behavior still is a mystery, i renamed some variables and it started working.)