![]() Possibility number one, you are never calling guiModify() with unknown parameters. In all of your guiModify() calls, you have either parsed an all-caps string or set it to all-caps with string.upper(). However this would then also benefit from re-arranging your conditional statements, but I’m not going to go that deep into this. You could have if alley and not takedown then ![]() You can also remove the line takedown = not takedown, and then reverse your conditional checks.įor example, rather than takedown = not takedown You are effectively asking if takedown is true, and if the answer if no you’re proceeding to ask if it is NOT true. Here, if takedown = true you will never reach the check for not takedown. GuiModify("Floods",string.upper("Takedown")) GuiModify("Traffic",string.upper(traffic))Ĭar.:FireServer("Takedown") GuiModify("Lights",string.upper(pattern))Ĭar.:FireServer("Wail")Ĭar.:FireServer("AirhornOn")Ĭar.:FireServer("Phaser")Ĭar.:FireServer("Yelp")Ĭar.:FireServer("Right")Ĭar.:FireServer("Split")Ĭar.:FireServer("Off")Ĭar.:FireServer("Left") Local car = workspace.BodyĬar.:FireServer(pattern) ( Context: The GUI referenced in the code below is displayed only to the person in the vehicle seat.) local pattern = "Off" If anyone has suggestions or feedback, it would be greatly appreciated. ![]() I don’t think I’m writing them properly, so I just remove them from my code. I’ve tried fake ternaries, but I always seem to run into problems with them. I’m not sure why, but something about this code seems buggy and/or like it could be optimized. ![]() ![]() I’ve created an ELS (Emergency Lighting System) for my vehicles. Code Review for Emergency Vehicle Lighting and Siren ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |