gokalpfirat Posted September 11, 2011 Share Posted September 11, 2011 Hi i added race_nos2 c_settings file function consoleSetNosFiringStyle() if (g_Settings.ControlStyle = "normal") then g_Settings.ControlStyle = "nfs" elseif (g_Settings.ControlStyle = "nfs") then g_Settings.ControlStyle = "hybrid" elseif (g_Settings.ControlStyle = "hybrid") then g_Settings.ControlStyle = "normal" if saveSettingsToFile() then outputGuiPopup("Your NOS control style has been set to '" .. tostring(settingName) .. "'") end end end addCommandHandler("noscontrol", consoleSetNosFiringStyle) addCommandHandler("nos", consoleSetNosFiringStyle) But it doesnt works. It must do when i say /nos change my nos to another nos style. Ps: I get error at line 80 ')' expected near '=' Link to comment
gokalpfirat Posted September 11, 2011 Author Share Posted September 11, 2011 Please help Link to comment
Headshot4Fun Posted September 11, 2011 Share Posted September 11, 2011 I Don't even know what you are doing, but when we are using if we use "==" not just one "=", but im not sure if this will work, try, elseif not, post /debugscript 3 function consoleSetNosFiringStyle() if (g_Settings.ControlStyle == "normal") then g_Settings.ControlStyle = "nfs" elseif (g_Settings.ControlStyle == "nfs") then g_Settings.ControlStyle = "hybrid" elseif (g_Settings.ControlStyle == "hybrid") then g_Settings.ControlStyle = "normal" if saveSettingsToFile() then outputGuiPopup("Your NOS control style has been set to " ..tostring(settingName)) end end end addCommandHandler("noscontrol", consoleSetNosFiringStyle) addCommandHandler("nos", consoleSetNosFiringStyle) Link to comment
gokalpfirat Posted September 11, 2011 Author Share Posted September 11, 2011 Not working but not getting same error. Link to comment
Headshot4Fun Posted September 11, 2011 Share Posted September 11, 2011 Not working but not getting same error.Its not an function error, theres a missing ")" in this function, this part is right ( in terms of lua sintax ). But about scripting i can't say nothing, because i don't have the full script. Sometimes the debugscript gets the wrong line... 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