Can't step into program "The source code for this script is not available..."

Danger CodeDanger Code Join Date: 2008-11-16 Member: 65470Members
I've tried using Decoda today, and I'm running into a problem. I've set up a very simple C++ app that runs a Lua script.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// lua_test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include <stdio.h>
#include <conio.h>

extern "C"
{
    #include "lua.h"
    #include "lualib.h"
    #include "lauxlib.h"
}
#pragma comment(lib, "lua5.1.lib")

int _tmain()
{
    lua_State* L = NULL;

    L = lua_open();
    luaL_openlibs(L);

    luaL_dofile(L, "test.lua");

    lua_close(L);

    /* pause */
    printf("Press any key.");
    _getch();

    return 0;
}<!--c2--></div><!--ec2-->

And no matter what I try I keep getting this messge when I hit F11 to step into the program ...

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->The source code for this script is not available. To view script source code,
the script file must be added to the current project, or the debugger must be
attached when the client loads the file.<!--QuoteEnd--></div><!--QuoteEEnd-->

I most be doing something incredibly stupid. But I have tried all sorts of different things with the project settings and the path of my lua script file. My application *does* run if I continue debugging (F5) but I can't trap any break points.

Any suggestions?

Comments

  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1693554:date=Nov 15 2008, 11:03 PM:name=Danger Code)--><div class='quotetop'>QUOTE(Danger Code @ Nov 15 2008, 11:03 PM) <a href="index.php?act=findpost&pid=1693554"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I've tried using Decoda today, and I'm running into a problem. I've set up a very simple C++ app that runs a Lua script.

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// lua_test.cpp : Defines the entry point for the console application.
    //

    #include "stdafx.h"

    #include <stdio.h>
    #include <conio.h>

    extern "C"
    {
        #include "lua.h"
        #include "lualib.h"
        #include "lauxlib.h"
    }
    #pragma comment(lib, "lua5.1.lib")

    int _tmain()
    {
        lua_State* L = NULL;

        L = lua_open();
        luaL_openlibs(L);

        luaL_dofile(L, "test.lua");

        lua_close(L);

        /* pause */
        printf("Press any key.");
        _getch();

        return 0;
    }<!--c2--></div><!--ec2-->

    And no matter what I try I keep getting this messge when I hit F11 to step into the program ...
    I most be doing something incredibly stupid. But I have tried all sorts of different things with the project settings and the path of my lua script file. My application *does* run if I continue debugging (F5) but I can't trap any break points.

    Any suggestions?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Everything you are doing looks correct. Can you send your application to max@unknownworlds.com?
  • Chaos DragonChaos Dragon Join Date: 2008-11-19 Member: 65493Members
    edited November 2008
    Hello,i'm using this amazing tools now!Thanks for give us such a GOOD TOOLS!

    And i also meet this error ,but when i change the lua vesion from 5.1 to 5.0 ,the error has gone.Is the Decoda does not support Lua 5.1?

    I'will mail my code to you.i'm glad to see your reply.


    sorry for my poor english.O(∩_∩)O
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1693805:date=Nov 18 2008, 10:38 PM:name=Chaos Dragon)--><div class='quotetop'>QUOTE(Chaos Dragon @ Nov 18 2008, 10:38 PM) <a href="index.php?act=findpost&pid=1693805"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Hello,i'm using this amazing tools now!Thanks for give us such a GOOD TOOLS!

    And i also meet this error ,but when i change the lua vesion from 5.1 to 5.0 ,the error has gone.Is the Decoda does not support Lua 5.1?

    I'will mail my code to you.i'm glad to see your reply.
    sorry for my poor english.O(∩_∩)O<!--QuoteEnd--></div><!--QuoteEEnd-->
    Decoda does support Lua 5.1, although we're starting to see some reports about problems with the most recent patch Lua 5.1.4. Is that the version you tried?
  • Chaos DragonChaos Dragon Join Date: 2008-11-19 Member: 65493Members
    yes, i use lua 5.1.4.
  • Danger CodeDanger Code Join Date: 2008-11-16 Member: 65470Members
    <!--quoteo(post=1693737:date=Nov 18 2008, 06:17 PM:name=Max)--><div class='quotetop'>QUOTE(Max @ Nov 18 2008, 06:17 PM) <a href="index.php?act=findpost&pid=1693737"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Everything you are doing looks correct. Can you send your application to max@unknownworlds.com?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Yes, I sent my app your way (and thanks for getting back).

    It sounds like you don't need it though. Like Chaos Dragon I am using 5.1.4 supplied by <a href="http://luaforwindows.luaforge.net/" target="_blank">Lua For Windows</a> (version 5.1.4.18).
  • Chaos DragonChaos Dragon Join Date: 2008-11-19 Member: 65493Members
    To Danger Code:

    This error can be avoid if you use the static link lib.Don't use the lua for windows(it's dynamic link library).Download the lua static link library from luabinaries.luaforge.net
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    This bug will be fixed in the next release of Decoda (1.11), which is currently undergoing testing.
Sign In or Register to comment.