Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

New project Wizard: Squirrel error

<< < (2/2)

jimbo:
Odd, reduced the script to the bare minium, still get this weird error. I wonder if I have accidentally changed something somewhere. Odd that other wizards.e.g. Arm, don't give the error though.  No xrc file  in this example.


--- Code: ---////////////////////////////////////////////////////////////////////////////////
// Code::Blocks Project Wizard
////////////////////////////////////////////////////////////////////////////////

function BeginWizard()
{
    local wiz_type = Wizard.GetWizardType();

    if (wiz_type == wizProject)
    {
        // this is the text that will appear in the start (intro) page
        local intro_msg = _T("Welcome to the new application wizard!\n" +
                             "This wizard will guide you through the steps needed to create a new application.\n\n" +
                             "Please click \"Next\" to proceed.");

        // intro
        Wizard.AddInfoPage(_T("Intro"), intro_msg);

        // select project name and path
        Wizard.AddProjectPathPage();
    }
}


////////////////////////////////////////////////////////////////////////////////
// Final project setup
////////////////////////////////////////////////////////////////////////////////

function GetFilesDir()
{
    return _T("");
}

function SetupProject(project)
{
}

// Allows script generated files to be passed back to the project setup.
// Each time, return a string of the form "filename.ext;contents"
// you can change the return string based on <file_index>
// return an empty string to denote that no more files are to be generated
function GetGeneratedFile(file_index)
{
    return _T("");
}


--- End code ---

Did wonder if I had some persistent setting for the project name, but renamed the directory, added the new one to config.script, but still failing. Most odd.

BlueHazzard:
Setup project has to return a value. If you return true it should work without error

jimbo:
Hurrah!!!

That was it, thanks!

Much appreciated. Although the error message could be clearer....

BlueHazzard:
All errors in squirrel could be more clearer...

Navigation

[0] Message Index

[*] Previous page

Go to full version