GameMonkey Script

GameMonkey Script Forums
It is currently Mon Mar 18, 2019 8:06 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Oct 29, 2007 6:39 pm 
Offline

Joined: Fri Oct 26, 2007 6:06 pm
Posts: 15
Hi all,

I've got a problem with the following function using gmBind. This is using my own Vector3 class, not the supplied example one.

Code:
int gmVector3::set(gmThread *a_thread)
{
   Vector3 *native = gmVector3::GetThisObject(a_thread);
   if (a_thread->Param(0).m_type == GetType())
   {
      GM_CHECK_USER_PARAM (Vector3*, GetType(), otherVec, 0);
      *native = *otherVec;
   }

   return GM_OK;
}

Code:
a = Vector3(1, 2, 3);
b = Vector3(4, 5, 6);
a.set(b);
a.set(Vector3(7, 8, 9)); // also fails

Specifically, otherVec is garbage (seemingly uninitialised). I'm taking this pretty much directly from the supplied Vector3 example so I'm not sure what's gone wrong. All other functions (which don't take a Vector3 as a parameter) work fine. I'm using gmBind 0.9.5a, and the most recent version of GM. Any help would be greatly appreciated!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group