Results 1 to 2 of 2

Thread: Help with tutorial chapter 7

  1. #1

    Default Help with tutorial chapter 7

    Hi, I'm new to Novashell and somewhat new to Lua and I've been going through the tutorials on the site.

    I had a bit of trouble with chapter 6, and even though my code matched the source line for line I had a lot of problems. Since replacing my scripts with the tutorial scripts didn't fix anything, I figured I had messed up some small detail in the visual interface, and wanting to continue I resumed with the source provided in chapter 7.

    I downloaded the "chapter 6 completed" source file and made a new world for it, as well as installing the crayon animation into it's specified directory. Then I entered the very first line of code that is added from the tutorial (bolded):

    function OnInit() //run upon initialization
    	this:SetVisualProfile("top_crayon/top_crayon.xml", "top_crayon");
    	//hint to the path-finding system that it can ignore this while computing paths if it needs to
    This gave me two errors

    The first:
    -1:worlds/DragonEggs/script/player.lua:6: attempt to call method 'setVisualProfile' (a nil value)

    The second:
    Must add a base brain before state Idle can be set.

    The second error repeats continuously.

    This has me baffled because everything is stock provided by the tutorial, and as I've just started learning Lua I don't know enough to debug this on my own. I looked through the forums and couldn't find anything.

    Otherwise, I really like the interface compared to other 2D game engines and would like to learn more, but I seem to have hit a roadblock.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002


    Hi laice,

    Check your player.lua script carefully.

    I'll bet you dollars to dragons that you have:

    this:setVisualProfile("top_crayon/top_crayon.xml", "top_crayon");
    instead of:
    this:SetVisualProfile("top_crayon/top_crayon.xml", "top_crayon");
    See the s? Yeah, the functions are all case sensitive. That cryptic error means it couldn't locate the function.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. New ClanLib Tutorial
    By sphair in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 11-26-2010, 06:58 AM
  2. Complete tutorial
    By Quester in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 12-23-2009, 01:59 PM
  3. Tutorial for NetObjects?
    By garaone in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-06-2007, 09:53 PM
  4. Problem with the tutorial.
    By Ledorax in forum Novashell Game Creation System
    Replies: 3
    Last Post: 02-12-2007, 08:14 AM
  5. Tutorial for Dink
    By Davidi in forum Dink Smallwood HD
    Replies: 2
    Last Post: 07-18-2004, 01:16 PM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts