Jump to content

then expected near =


xUltimate

Recommended Posts

Posted

Cant find out what's wrong with this, can someone help me?

addCommandHandler( "duty", 
    function( player, commandName ) 
        local faction = tonumber( faction ) 
        local duty = { } 
        if factions[ SFPD ] then 
            if duty = false then 
                duty[ player ] = true 
                setPlayerNametagColor( player, 0, 0, 255 ) 
            else if duty = true then 
                duty[ player] = false 
                setPlayerNametagColor( player, 255, 255, 255 ) 
            end 
        else if factions[ SFEMS ] then 
            if duty = false then 
                duty[ player ] = true 
                setPlayerNametagColor( player, 255, 0, 0 ) 
            else if duty = true then 
                duty[ player] = false 
                setPlayerNametagColor( player, 255, 255, 255 ) 
            end 
        end 
    end, 
    true 
) 

Posted

dude... give us MORE information please i'm lazy to find the error. (i mean what line u gentting this etc u know)

edit: well i've checked it, try this,

addCommandHandler( "duty", 
    function( player, commandName ) 
        local faction = tonumber( faction ) 
        local duty = { } 
        if factions[ SFPD ] then 
            if duty == false then 
                duty[ player ] = true 
                setPlayerNametagColor( player, 0, 0, 255 ) 
            else if duty == true then 
                duty[ player] = false 
                setPlayerNametagColor( player, 255, 255, 255 ) 
            end 
        end 
        else if factions[ SFEMS ] then 
            if duty == false then 
                duty[ player ] = true 
                setPlayerNametagColor( player, 255, 0, 0 ) 
            else if duty == true then 
                duty[ player] = false 
                setPlayerNametagColor( player, 255, 255, 255 ) 
                    end 
                end 
           end 
        end 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

syntax errors can be easly spotted, you can see the line which you make a mistake, whats the problem to go to that line and fix it?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...