Raised This Month: $ Target: $400
 0% 

Dynamic Native: Passing a string and an integer in the same parameter.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BARRY.
Junior Member
Join Date: Aug 2013
Old 01-20-2016 , 12:28   Dynamic Native: Passing a string and an integer in the same parameter.
Reply With Quote #1

Hi guys, I'm trying to pass a string and an integer on the same parameter. Was wondering if I've implemented this right.

Edit: If anybody else looking here's how I got it to work.

PHP Code:
native my_native_valueany:... )
register_native"my_native""_my_native", .style )

public 
_my_nativeiPluginiParams )

    if ( 
iParams != )
        return

    static 
bStringValueList = ( << ) | ( << ) | ( << )
 
    new 
iValue get_param
    new 
szBuffer32 
    new 
iInput
    
     
    
if ( ( << iValue ) & bStringValueList 
    { 
        
get_string2szBuffercharsmaxszBuffer ) )
    } 
    else
    {
        
iInput get_param_byref)
    }

    switch ( 
iValue 
    { 
        case 
1copyszMyString1charsmaxszMyString1 ), szBuffer 
        case 
2copyszMyString2charsmaxszMyString2 ), szBuffer 
        case 
3copyszMyString3charsmaxszMyString3 ), szBuffer 
        case 
4iVariable1 iInput 
        
case 5iVariable2 iInput 
        
case 6iVariable3 iInput 
    


Last edited by BARRY.; 01-31-2016 at 16:26.
BARRY. is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-20-2016 , 15:03   Re: Dynamic natives and vdformat
Reply With Quote #2

Have you wandered debug and see if it is doing as expected?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode