Code hint for Lua script

  • #1, by MehrdadSaturday, 31. January 2015, 16:51 6 years ago
    Hi
    I don't see any code hints in script editor.It's really difficult for write correct codes special beginner programmer.Isn't any way or any suggestion?

    Thanks

    Newbie

    39 Posts


  • #2, by afrlmeSaturday, 31. January 2015, 16:56 6 years ago
    Are you talking about auto-completion? Simon has not yet implemented that feature into the script system.

    There's loads of documentation, syntax & examples available in the wiki already.

    Imperator

    6846 Posts

  • #3, by MehrdadSaturday, 31. January 2015, 17:07 6 years ago
    Yes.for example after type Hero we could see all functions about character.or any similar.Also there is not any error messages when we run game as incorrect coding.why?

    Newbie

    39 Posts

  • #4, by afrlmeSaturday, 31. January 2015, 17:35 6 years ago
    In game options set log level to info. This will print all messages to the log file.

    While running your game via the editor you can press tab to toggle the console on & off, then type print log & press enter to show the log for the current run session. It is not automatically updated though (currently) so you will have to type print log whenever you want to refresh it.

    Or you can navigate to the game folder in c:/users/username/appdata/local/game-company-ved name/messages.txt or messages.log (whichever it is).

    P.S: I really do recommend using Sublime Text or even Atom for writing your scripts in. Sublime Text wins hands down over Atom, but Atom is still pretty good & it's open source unlike Sublime Text which is a commercial product. They both have good auto-complete functions as well as search & replace & multi-word / line editing & they come with various themes too.

    P.P.S: I think an auto-complete system for VS script editor would be quite complicated to create because it would have to take into account the various different way in which things can be written, for example...
    Characters.Tom
    Characters["Tom"]
    getObject("Characters[Tom]")
    1
    2
    3
    4

    game.CurrentCharacter
    game:getLink(VGameCurrentCharacter)
    getObject("Game.GameCurrentCharacter")
    1
    2
    3
    4

    ...as you can see there are multiple ways of accessing the same information. Also the getObject method allows for multiple fields inside of a single getObject function.
    getObject("Game.GameCurrentCharacter.CharacterConditions[active]"):getBool(VConditionValue)
    1
    2

    Imperator

    6846 Posts

Write post