Jump to content

  • Log In with Google      Sign In   
  • Create Account

osiris_dev

Member Since 12 Sep 2011
Offline Last Active Oct 21 2014 09:58 AM

Topics I've Started

(Solved) string [] problem

26 August 2013 - 07:45 AM

Hello,

  strNum = strPropellerCurName[0];
  strPropellerCurName[0] = 49 + i;

I trying get or put some symbols from/to string in angel script but it fails with "out of range". Have some thoughts? And yes, all strings have info inside more then 1 size, it is just test.


Simple Angel Script Editor

31 May 2013 - 08:09 AM

Hello everyone,

 

I made simple editor for angel script files. Made it according base example "asbuild" from SDK. It is very simple but It have compiler with options to configure your own binding data to script engine. Of course without debugger it is not full IDE but everyone who tried write scripts for game without external compiler should understand my concept.

 

I used "wxWidgets 2.9.4" and "Angel Code 2.25". It is not open source yet because I used engine functions to made it fast. Maybe if someone will be interesting in improving of program then I could publish source.

 

Totem4 Script Editor 1.5 ( updated ): https://www.box.com/s/k51th5alfhcsrl08monc

 

All binding data is in "config.xml".

 

Good luck.


Visual Studio "Generating Code" infinitely

27 June 2012 - 03:26 AM

There was a problem with linking code in release mode. To be more precise after compiling begins "Generating Code" but never ending. I made a couple of tests and found that the reason connect with "Maximaze Speed" flag in C++ Optimization.

I have other projects for VS2010 SP1 but they have not problems.

Any ideas?

Script sees a global variable as null pointer

12 September 2011 - 12:23 AM

Hi all,

There is a small problem. I registered a few global properties.


static LPGameProcessGUI	g_TE3GameProcGUICurrent = NULL;

static LPGameProcessGUI	GetGUIProcContext()
{ 
	return g_TE3GameProcGUICurrent; 
}


	r = asScriptEngine->RegisterGlobalProperty("CTE3GameProcessGUI@ g_TE3GameProcGUICurrent", &g_TE3GameProcGUICurrent); assert( r >= 0);
	r = asScriptEngine->RegisterGlobalFunction("CTE3GameProcessGUI@ GetGUIProcContext()", asFUNCTION(GetGUIProcContext), asCALL_CDECL ); assert( r >= 0);



and singleton

class CTE3ScriptManager
{
protected: 
	static CTE3ScriptManager m_ScriptManager;

	CTE3ScriptManager();

public:
	virtual ~CTE3ScriptManager(void);


static CTE3ScriptManager& Get() { return m_ScriptManager; }
};

 // registry inside class
 r = m_asScriptEngine->RegisterGlobalProperty("CTE3ScriptManager ScriptManager", this); assert( r >= 0);

Inside my script I get null pointer for variables, although in C + + debugger all variables are initialized.

    string strButtonName = "_lv_ButtonName";

//  ScriptManager - thi null
	strButtonName = ScriptManager.GetScriptContextValuesLocal().GetValueNameString(string("_lv_ButtonName"));

	CTE3CIIScreen @pMainScreen = null;

// or this null
 	@pMainScreen        = GetGUIProcContext().GetMainScreen();

AngelScript Runtime: gui_proc_change_screen.as: Null pointer access . line: 6. column: 2

What's wrong?

PARTNERS