05.05.2012, 08:56
Hi guys, when I was making this small piece of code, I thought I was programming in Lua so I put this down:
As you see I put in the statement 'then', now that came up with a funny error.
As you can see the expected token is '*then', and so I put that into my command.
And it came up with no errors. And the code works.
Now, am I a total noob for not ever knowing about this? Or does no one ever use it? Because I haven't seen this being used in many scripts. And were any of you aware of this?
pawn Код:
COMMAND:admins(playerid, params[])
{
new AdminCount = 0;
foreach(Player, i) if pData[i][AdminLevel] >= 1 then AdminCount++;
}
Код:
C:\Documents and Settings\Elliot\My Documents\Game Stuff\San Andreas Flight Club\Server\gamemodes\flight.pwn(426) : error 001: expected token: "*then", but found "-identifier-" C:\Documents and Settings\Elliot\My Documents\Game Stuff\San Andreas Flight Club\Server\gamemodes\flight.pwn(426) : error 017: undefined symbol "then"
pawn Код:
COMMAND:admins(playerid, params[])
{
new AdminCount = 0;
foreach(Player, i) if pData[i][AdminLevel] >= 1 *then AdminCount++;
}
Now, am I a total noob for not ever knowing about this? Or does no one ever use it? Because I haven't seen this being used in many scripts. And were any of you aware of this?