Tokio Posted October 15, 2017 Share Posted October 15, 2017 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? Link to comment
WorthlessCynomys Posted October 15, 2017 Share Posted October 15, 2017 Hello. Is this xy.lua? Link to comment
Tokio Posted October 15, 2017 Author Share Posted October 15, 2017 14 minutes ago, Randomly said: Hello. Is this xy.lua? No. Link to comment
WorthlessCynomys Posted October 15, 2017 Share Posted October 15, 2017 The error is in xy.lua Link to comment
Gr0x Posted October 15, 2017 Share Posted October 15, 2017 You should show us "xy.lua", since there is nothing wrong in this code. Link to comment
Scripting Moderators thisdp Posted October 15, 2017 Scripting Moderators Share Posted October 15, 2017 (edited) First create a txt file with UTF-8 Encoding. Then copy the text into it. I think it is caused by utf8 head. Edited October 15, 2017 by thisdp 1 Link to comment
Tokio Posted October 15, 2017 Author Share Posted October 15, 2017 server.lua 1 minute ago, thisdp said: First create a txt file with UTF-8 Encoding. Then copy the text into it. Thank you! Working with UTF-8 1 Link to comment
Scripting Moderators thisdp Posted October 15, 2017 Scripting Moderators Share Posted October 15, 2017 2 minutes ago, 50cent said: server.lua Thank you! Working with UTF-8 My pleasure. 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now