Maris Posted November 23, 2015 Share Posted November 23, 2015 (edited) You want ask, how to find a bug if you got crash screen. Well, I just helped to a friend to find a bug in his code. Let's see... You wonder is there a method to find any bug for sure?.. No. Every time it will be a quest game. But if you want to play this quest game well, you should know lua well. That's all. Learn lua and you will win. Edited November 23, 2015 by JoeW Link to comment https://forums.kleientertainment.com/forums/topic/59352-info-how-to-find-bugs/ Share on other sites More sharing options...
Mobbstar Posted November 23, 2015 Share Posted November 23, 2015 This is a horrible "explanation". You didn't describe any tools and methods used. Please explain what "log.txt" and "print()" do, maybe search function (usually ctrl+f), ideally add a list summing up the steps you took in the example. Link to comment https://forums.kleientertainment.com/forums/topic/59352-info-how-to-find-bugs/#findComment-688136 Share on other sites More sharing options...
Maris Posted November 23, 2015 Author Share Posted November 23, 2015 Tools : any text editor (notepad++), any tool for searching files, any tool for searching text in files, brain. Methods: Ctrl+F Requirements: knowing lua well. Steps:1) Search2) Search3) Search4) Think5) Search6) Think7) Think8) Profit Link to comment https://forums.kleientertainment.com/forums/topic/59352-info-how-to-find-bugs/#findComment-688138 Share on other sites More sharing options...
Mobbstar Posted November 24, 2015 Share Posted November 24, 2015 *sigh* Here's how to access log.txt: DS, DST In this simple text file, the game will put console messages. It will show crash messages (usually found quickly by searching for "stack traceback" and reading that portion from top to bottom). You can use "print()" to show your own messages in the log.txt, which allows you to tell exactly what code fires when. Does it work at all? Use print(). The error message is useless, what makes it crash? Use print(). e.g.:function() --arbitrary, hypothetical prefab local inst = CreateEntity() print("marco") --print can use any string inst:AddComponent("inspectable") print("polo", inst.prefab) --you can also print variables (in this case prefab name) inst.components.inventoryitem.atlasname = "images/coolitem.xml" --this is the error print("mary") --this line doesn't show up in the log, so it crashed earlier... MakeSmallBurnable(inst) print("joseph") return instend Link to comment https://forums.kleientertainment.com/forums/topic/59352-info-how-to-find-bugs/#findComment-688287 Share on other sites More sharing options...
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