Jump to content

Traffic light script error


Recommended Posts

When testing a script I made I encountered the following error.

Error.jpg

Why this error pops up is unknown to me, Some help would be appriciated.

My code

  
Function NS() 
      setTrafficLightState ( string green, string red ) 
Function EW() 
  
      setTraffivLightState ( string red, string green ) 
  
  
end 
addCommandHandler ( "NSgreenlight", NS ) 
addCommandHandler ( "EWgreenlight", EW ) 
  

It's not my meta.xml so i'm not gonna post that unleass it's absolutely necesary I guess. :(

Link to comment
function NS(command, g, r) -- "function" must be with lowercase 
      setTrafficLightState ( tostring(g), tostring(r) ) 
end -- every function must contain an "end" in the end 
  
function EW(command, r, g) 
      setTraffivLightState ( tostring(r), tostring(g) ) 
end 
  
addCommandHandler ( "NSgreenlight", NS ) 
addCommandHandler ( "EWgreenlight", EW ) 

Link to comment
  • Moderators
The latest server version is 1.0.5

My gta sa version is 1.0 dose that make a difference.

No because MTA can only support the 1.0 gta's version and the MTA's version is the MTA's version :roll: so don't take care about it :wink:

Link to comment

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