Raised This Month: $51 Target: $400
 12% 

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
nergal
Veteran Member
Join Date: Apr 2012
Old 12-06-2015 , 16:43   Re: New API and Syntax
Reply With Quote #671

question: howto compile sourcepawn compiler?
__________________
nergal is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 12-06-2015 , 16:57   Re: New API and Syntax
Reply With Quote #672

I did compile with AMBuild.
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-06-2015 , 17:35   Re: New API and Syntax
Reply With Quote #673

Quote:
Originally Posted by nergal View Post
question: howto compile sourcepawn compiler?
With AMBuild, https://github.com/alliedmodders/sourcepawn has an option in configure.py to specify what suite of SP to compile.
WildCard65 is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 12-07-2015 , 12:13   Re: New API and Syntax
Reply With Quote #674

Quote:
Originally Posted by WildCard65 View Post
With AMBuild, https://github.com/alliedmodders/sourcepawn has an option in configure.py to specify what suite of SP to compile.
ok, how do I use AMBuild to only compile the 1.7 compiler?
__________________
nergal is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-07-2015 , 12:30   Re: New API and Syntax
Reply With Quote #675

Quote:
Originally Posted by nergal View Post
ok, how do I use AMBuild to only compile the 1.7 compiler?
The SourcePawn code wasn't separate from SM in 1.7.x, you'll need to build SM in it's entirety.

You can avoid most of the deps: (for linux, figure it out yourself or follow the wiki instructions if you're on another platform)
Code:
git clone --recursive --depth=1 --branch=tf2 https://github.com/alliedmodders/hl2sdk.git hl2sdk-tf2
git clone --recursive --depth=1 --branch=1.10-dev https://github.com/alliedmodders/metamod-source.git
git clone --recursive --depth=1 --branch=1.7-dev https://github.com/alliedmodders/sourcemod.git
python ./configure.py -s present --no-mysql --enable-optimize
ambuild obj-linux
./obj-linux/sourcepawn/compiler/spcomp/spcomp
If your build fails with "cc1: all warnings being treated as errors" it is because you're using a newer compiler version than we are for builds, and you'll need to disable -Werror (just delete the line in AMBuildScript). You may also have other failures using a newer compiler, please post a new thread if you need help building SM.
__________________
asherkin is online now
nergal
Veteran Member
Join Date: Apr 2012
Old 01-10-2016 , 20:21   Re: New API and Syntax
Reply With Quote #676

if it's not already in the planned features list, may I request that references be usable outside function params?

PHP Code:
int number 1;
intnum number;
num 5//number is now 5 
__________________

Last edited by nergal; 01-10-2016 at 20:21.
nergal is offline
BAILOPAN
Join Date: Jan 2004
Old 01-11-2016 , 05:13   Re: New API and Syntax
Reply With Quote #677

I don't see non-argument references ever happening. There's not a lot of utility for them right now and it complicates thinking about other features (like nested functions).
__________________
egg
BAILOPAN is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 01-11-2016 , 11:35   Re: New API and Syntax
Reply With Quote #678

Quote:
Originally Posted by BAILOPAN View Post
I don't see non-argument references ever happening. There's not a lot of utility for them right now and it complicates thinking about other features (like nested functions).
like this? I call em Function generators

PHP Code:
     float foo (float afloat b)
     {
         
float square (float z) { return z; }
         return 
square (a) + square (b);
     } 
Problem is, won't this skyrocket function overhead?
__________________

Last edited by nergal; 01-11-2016 at 20:37.
nergal is offline
BAILOPAN
Join Date: Jan 2004
Old 01-13-2016 , 03:35   Re: New API and Syntax
Reply With Quote #679

I'm not really sure what you're asking.
__________________
egg
BAILOPAN is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 01-23-2016 , 01:46   Re: New API and Syntax
Reply With Quote #680

question on methodmaps...

Can methodmaps have timer functions stored in them?

If yes, How can I use them in CreateTimer?

PHP Code:
methodmap MethMap
{

    public 
MethMap (int indexbool uid false)
    {
        if (
uid) {
            return 
view_as<MethMap>( index );
        }
        return 
view_as<MethMap>( GetClientUserId(index) );
    }

    
property int userid {
        public 
get()                { return view_as<int>(this); }
    }
    
property int index {
        public 
get()                { return GetClientOfUserIdthis.userid ); }
    }

    public 
Action dotimerz(Handle Timerany data)
    {
        return 
Plugin_Continue;
    }
};

public 
void OnPluginStart()
{
    
MethMap objectx;
    for ( 
int i <= MaxClients ; ++)
    {
        if ( !
IsValidClient(i) ) continue;
        
OnClientPutInServer(i);
        
objectx MethMap(i);
        
CreateTimer(120.0objectx.dotimerzobjectx.userid);
    }

__________________
nergal is offline
Reply



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 04:37.


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