Jump to content

[HELP] Why not working this script??


Tokio

Recommended Posts

code:

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()),
    function()
            exports [ "scoreboard" ]:addScoreboardColumn ( "Jármű:", 3 )
    end
)
 
setTimer ( function ( )
 local players = getElementsByType "player"
    for k, v in ipairs ( players ) do
        if ( isPedInVehicle(v) ) then
           local vehicle =  getPedOccupiedVehicle(v)
          local carname = getVehicleName(vehicle)
        setElementData ( v, "Jármű:", tostring(carname) )
               else
        setElementData ( v, "Jármű:", "Nincs")
      end
    end
end, 2500, 0 )

and i get this error:

ERROR: Loading script failed: xy/xy.lua:1: unexpected symbol near '?'

how to fix this? :S

 

Link to comment
  • Scripting Moderators

First create a txt file with UTF-8 Encoding. Then copy the text into it. 

I think it is caused by utf8 head.

Edited by thisdp
  • Thanks 1
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...