Jump to content

Bad argument problem


Jade

Recommended Posts

Posted
function basla() 
zaman1 = setTimer(isik21,1000,0) 
zaman2 = setTimer(isik22,2000,0) 
zaman3 = setTimer(isik23,3000,0) 
zaman4 = setTimer(isik23,4000,0) 
end 
  
function isik() 
playerVehicle = getPedOccupiedVehicle ( getLocalPlayer() )  
if ( playerVehicle ) then  
setVehicleOverrideLights ( playerVehicle, 1 ) 
killTimer(zaman1) 
killTimer(zaman2) 
killTimer(zaman3) 
killTimer(zaman4) 
end 
end  

debugscript;

WARNING: as\C.lua:12: Bad argument @ 'killTimer' [Expected lua-timer at argument 1]

WARNING: as\C.lua:13: Bad argument @ 'killTimer' [Expected lua-timer at argument 1]

WARNING: as\C.lua:14: Bad argument @ 'killTimer' [Expected lua-timer at argument 1]

WARNING: as\C.lua:15: Bad argument @ 'killTimer' [Expected lua-timer at argument 1]

Posted
buton1 = guiCreateButton(20,60,70,40,"Kırmızı",false,pencere) 
  
addEventHandler("onClientGUIClick",buton1,basla) 

and

how press button 1 times

i press x3 'function isik ()' start x3

sorry my bad english

  • Moderators
Posted

Like this ?

function basla() 
    setTimer(isik, 1000, 3) --will execute isik each 1000 milliseconds but only 3 times 
end 
  
function isik() 
    local playerVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) 
    if ( playerVehicle ) then 
        setVehicleOverrideLights ( playerVehicle, 1 ) 
    end 
end 

The rEvolution is coming ...

  • Moderators
Posted

Two reasons:

1 - You didn't created the timers yet.

2 - They already have been killed (so you probably killing them twice).

and I would suggest you to use google translate. It would probably help us to understand you better.

The rEvolution is coming ...

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...