AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Whatīs the problem with this "else"? (https://forums.alliedmods.net/showthread.php?t=87978)

dogandcat 03-18-2009 21:06

Whatīs the problem with this "else"?
 
Code:

        if(pev(id, pev_maxspeed) != 1.0)
        {
          new ....
          .... = it is not the problem....
           
            if (....)
            {
                static Float:originF[3]           
                pev(id, pev_origin, originF)
                // Colored Aura
                engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
                write_byte(TE_DLIGHT) // TE id
                engfunc(EngFunc_WriteCoord, originF[0]) // x
                engfunc(EngFunc_WriteCoord, originF[1]) // y
                engfunc(EngFunc_WriteCoord, originF[2]) // z
                write_byte(13) // radius asdasdasd
                write_byte(255) // r
                write_byte(0) // g
                write_byte(0)  // b
                write_byte(2) // life
                write_byte(0) // decay rate
                message_end()
               
                // Particle Burst
                engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
                write_byte(TE_PARTICLEBURST) // TE id
                engfunc(EngFunc_WriteCoord, originF[0]) // x
                engfunc(EngFunc_WriteCoord, originF[1]) // y
                engfunc(EngFunc_WriteCoord, originF[2]) // z
                write_short(20) // radius
                write_byte(60) // color
                write_byte(3) // duration (will be randomized a bit)
                message_end()
            }   
            else if (....)
            {   
                static Float:originF[3]           
                pev(id, pev_origin, originF)
                // Colored Aura
                engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
                write_byte(TE_DLIGHT) // TE id
                engfunc(EngFunc_WriteCoord, originF[0]) // x
                engfunc(EngFunc_WriteCoord, originF[1]) // y
                engfunc(EngFunc_WriteCoord, originF[2]) // z
                write_byte(13) // radius asdasdasd
                write_byte(255) // r
                write_byte(112) // g
                write_byte(40)  // b
                write_byte(2) // life
                write_byte(0) // decay rate
                message_end()
            }   
            else if (....)
            {   
                static Float:originF[3]           
                pev(id, pev_origin, originF)
                // Colored Aura
                engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
                write_byte(TE_DLIGHT) // TE id
                engfunc(EngFunc_WriteCoord, originF[0]) // x
                engfunc(EngFunc_WriteCoord, originF[1]) // y
                engfunc(EngFunc_WriteCoord, originF[2]) // z
                write_byte(13) // radius asdasdasd
                write_byte(255) // r
                write_byte(255) // g
                write_byte(0)  // b
                write_byte(2) // life
                write_byte(0) // decay rate
                message_end()
            }   
            else if (....)
            {   
                static Float:originF[3]           
                pev(id, pev_origin, originF)
                // Colored Aura
                engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
                write_byte(TE_DLIGHT) // TE id
                engfunc(EngFunc_WriteCoord, originF[0]) // x
                engfunc(EngFunc_WriteCoord, originF[1]) // y
                engfunc(EngFunc_WriteCoord, originF[2]) // z
                write_byte(13) // radius asdasdasd
                write_byte(0) // r
                write_byte(255) // g
                write_byte(0)  // b
                write_byte(2) // life
                write_byte(0) // decay rate
                message_end()
            }
            else
        {   
            static Float:originF[3]           
            pev(id, pev_origin, originF)
            // Colored Aura
            engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
            write_byte(TE_DLIGHT) // TE id
            engfunc(EngFunc_WriteCoord, originF[0]) // x
            engfunc(EngFunc_WriteCoord, originF[1]) // y
            engfunc(EngFunc_WriteCoord, originF[2]) // z
            write_byte(13) // radius asdasdasd
            write_byte(0) // r
            write_byte(255) // g
            write_byte(0)  // b
            write_byte(2) // life
            write_byte(0) // decay rate
            message_end()
        }

the last else TE_DLIGHT isnīt working...i just was asking why...+k if you help me

Bugsy 03-18-2009 21:47

Re: Whatīs the problem with this "else"?
 
Try adding a closing bracket all the way at the bottom

}

If that doesnt do it, post your exact code.

dogandcat 03-18-2009 22:42

Re: Whatīs the problem with this "else"?
 
okay i will try it tomorrow, and if this doesnīt work, will post the code...


All times are GMT -4. The time now is 09:01.

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