AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   loose identation error (https://forums.alliedmods.net/showthread.php?t=45599)

Chaotic 10-06-2006 22:14

loose identation error
 
1 Attachment(s)
I tryed changing something in the adminmodx plugin. In the exec part, I added immunity check for amx_exec, amx_execteam without problem.

Now I am trying to add it to amx_execall.

I got something to work, but when compiling I am getting an loose identation error at line 515 (look below). The immunity check works, but it still does bother me. I just started coding and I want to know what I did wrong.

Here is what I have, if there is an easiest way, please let me know

----
Code:
// Get the info on the caller     new nameCalled[32], steamCalled[32]     get_user_name(id, nameCalled, 31)     get_user_authid(id, steamCalled, 31)         if(equal(cmd, "all"))     {     get_players(players, totalPlayers, "a")         for(counter = 0; counter < totalPlayers; counter++)         {             if(!(get_user_flags(players[counter])&IMMUNE))             {                 client_cmd(players[counter], toexec)             }         }
----

I am pretty sure it as do to something with the FOR and the counter, line 515 is in this one

for(counter = 0; counter < totalPlayers; counter++)

added the attachement, I don't know how to add it on the forum, sorry

commonbullet 10-06-2006 22:19

Re: loose identation error
 
http://en.wikipedia.org/wiki/Indent_style

Chaotic 10-06-2006 23:01

Re: loose identation error
 
I was gonna make a sarcastic comment on how unhelpfull you were, but then I realised that it was my fault and that the way I posted my code would have made it impossible for you to correct me.

So thx

Zenith77 10-06-2006 23:20

Re: loose identation error
 
You're missing a bracket. Also, place your code in "[small]" tags.

commonbullet 10-06-2006 23:27

Re: loose identation error
 
Sorry, I saw the plain code and the post title, I thought you had problems with identing. Like Zenith said, use small tags when you paste code in here.

dayletter 10-07-2006 16:08

Re: loose identation error
 
Code:

    if(equal(cmd, "all"))
    {
        get_players(players, totalPlayers, "a")
 
        for(counter = 0; counter < totalPlayers; counter++)



All times are GMT -4. The time now is 04:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.