Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    5,380

    VB structure V's LUA table

    ok, im a little confused....again

    how would i enumerate a VB structure in AMS

    am i right in assuming that

    this in VB
    Code:
    Enum CONST_DSFXDISTORTION_GAIN
      DSFXDISTORTION_GAIN_MAX = 0
      DSFXDISTORTION_GAIN_MIN = -60
    End Enum
    in AMS would be

    Code:
    CONST_DSFXDISTORTION_GAIN={}
    CONST_DSFXDISTORTION_GAIN.DSFXDISTORTION_GAIN_MAX = 0
    CONST_DSFXDISTORTION_GAIN.DSFXDISTORTION_GAIN_MIN = -60
    all this stuff is new to me, but im determind to get to grips with it
    Open your eyes to Narcissism, Don't let her destroy your life!!

  2. #2
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    I believe that would be correct. I would probaly shorten the names though. That's a lot of typing to access a value.
    Dermot

    I am so out of here

  3. #3
    Join Date
    May 2006
    Posts
    5,380
    ah, ok (pats self on the back) i got that bit nailed then

    i will proberly wrap it in functions to save some typeing, there are 50+ structures in this ocx so i will need some sort of system

    something like this should work
    Code:
    function SetDSFXDistortionGain(nMin,nMax)
    	CONST_DSFXDISTORTION_GAIN={}
    	CONST_DSFXDISTORTION_GAIN.DSFXDISTORTION_GAIN_MIN=nMin
    	CONST_DSFXDISTORTION_GAIN.DSFXDISTORTION_GAIN_MAX=nMax
    	return CONST_DSFXDISTORTION_GAIN
    end
    
    SetDSFXDistortionGain(-60,0)
    well, time to put it to the test then, thanks again Dermot
    Open your eyes to Narcissism, Don't let her destroy your life!!

  4. #4
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by RizlaUK View Post
    ah, ok (pats self on the back) i got that bit nailed then

    i will proberly wrap it in functions to save some typeing, there are 50+ structures in this ocx so i will need some sort of system

    something like this should work
    Code:
    function SetDSFXDistortionGain(nMin,nMax)
    	CONST_DSFXDISTORTION_GAIN={}
    	CONST_DSFXDISTORTION_GAIN.DSFXDISTORTION_GAIN_MIN=nMin
    	CONST_DSFXDISTORTION_GAIN.DSFXDISTORTION_GAIN_MAX=nMax
    	return CONST_DSFXDISTORTION_GAIN
    end
    
    SetDSFXDistortionGain(-60,0)
    well, time to put it to the test then, thanks again Dermot
    Code:
    function SetDSFXDistortionGain(nMin,nMax)
        return {DSFXDISTORTION_GAIN_MIN = nMin, DSFXDISTORTION_GAIN_MAX = nMax}
    end
    Also your table is global, if you're gonna return a table like that, local it first.

  5. #5
    Join Date
    May 2006
    Posts
    5,380
    good point

    that was just a example to make sure i know what im doing when it comes to adding the code to my project.......just kinda making a road map at the min as im undecided about a few things

    this project im planning is huge, or will be, so im going to need to plan it right from the get-go else months of waisted time, hence the barrage of question, lol
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. Future of APMS
    By bule in forum AutoPlay Media Studio 6.0
    Replies: 165
    Last Post: 03-24-2008, 10:31 PM
  2. PHP mySQL result into LUA table?
    By sdfsf93924554234fjfjf in forum AutoPlay Media Studio 7.5
    Replies: 0
    Last Post: 03-16-2008, 08:02 AM
  3. Creating a Table of Contents
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 11:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts