Skip to main content
GameDev.net gamedev.net
🔒 Locked

Problem with function parameters

Started by gilad_novik Jul 27, 2006 at 12:25 AM 2 replies 1.8k views
Original Post
gilad_novik
gilad_novik
I register a string class based on ATL's CString (pretty standard, registered as CDA). In addition, I have a function to download a page from the net:

bool Get(const CString& szURL,CString& szHTML)
{
...
}

pEngine->RegisterObjectMethod("Http","bool get(const string ∈,string &out)", asMETHOD(CHttp,Get),asCALL_THISCALL);

I can't use szHTML in my code since it's always null. I can declare the function as &inout which should work, but I wonder what I'm doing wrong in my code. Gilad
WitchLord
WitchLord
What version of AngelScript are you using? I seem to remember fixing a problem similar to this before.

I'll look into it anyway.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
WitchLord
WitchLord
I haven't been able to reproduce this problem.

Are you using any special settings, such AS_ALLOW_UNSAFE_REFERENCES, or AS_MAX_PORTABILITY?
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.