Jump to content

Recommended Posts

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...

7488958.png

 

 

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 by JoeW
Link to comment
https://forums.kleientertainment.com/forums/topic/59352-info-how-to-find-bugs/
Share on other sites

*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 inst
end

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
×
  • Create New...