Raised This Month: $ Target: $400
 0% 

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
BAILOPAN
Join Date: Jan 2004
Old 06-09-2015 , 18:44   Re: New API and Syntax
Reply With Quote #511

Take out the "&".
__________________
egg
BAILOPAN is offline
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 06-09-2015 , 19:09   Re: New API and Syntax
Reply With Quote #512

Quote:
Originally Posted by m_bNightstalker View Post
native int GetSpawnPoint(int index, float &point[3]);

error 067: variable cannot be both a reference and an array (variable "point")

Whats wrong here guys?
arrays are always pass as a reference to be more specific.
Mathias. is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 06-11-2015 , 13:19   Re: New API and Syntax
Reply With Quote #513

Code:
enum TFObjectType
{
	TFObject_CartDispenser = 0,
	TFObject_Dispenser = 0,
	TFObject_Teleporter = 1,
	TFObject_Sentry = 2,
	TFObject_Sapper = 3
};

public void OnPluginStart()
{
	PrintToServer("-> %d", view_as<int>(TFObject_Sentry) == 2); // Tag mismatch
	PrintToServer("-> %d", 2 == view_as<int>(TFObject_Sentry)); // No tag mismatch..
}
More tag quirks with SourcePawn Compiler 1.7.2-dev+5191.
__________________
pheadxdll is offline
BAILOPAN
Join Date: Jan 2004
Old 06-11-2015 , 14:16   Re: New API and Syntax
Reply With Quote #514

@pheadxdll: could you file a bug?
__________________
egg
BAILOPAN is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 06-20-2015 , 02:53   Re: New API and Syntax
Reply With Quote #515

Quote:
Originally Posted by Chdata View Post
Maybe this should be in the OP somewhere?

https://sm.alliedmods.net/new-api/
Reposting this again since I spent 20 minutes trying to finding this page.
Potato Uno is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 06-20-2015 , 02:59   Re: New API and Syntax
Reply With Quote #516

Quote:
Originally Posted by Potato Uno View Post
Reposting this again since I spent 20 minutes trying to finding this page.
http://www.sourcemod.net/ and click "Script Functions".
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 06-21-2015 , 18:46   Re: New API and Syntax
Reply With Quote #517

will there be support for unsigned int and long etc in the future ?
xerox8521 is offline
BAILOPAN
Join Date: Jan 2004
Old 06-22-2015 , 00:42   Re: New API and Syntax
Reply With Quote #518

if & when we get alternate integer types they will be explicit width (i.e. uint32, int64). probably not soon, but they're on my todo list.
__________________
egg
BAILOPAN is offline
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 06-26-2015 , 06:25   Re: New API and Syntax
Reply With Quote #519

What about asynchronous function?

It will help for some optimization of big plugin: running a function in an other thread.
kossolax is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 06-26-2015 , 12:52   Re: New API and Syntax
Reply With Quote #520

Quote:
Originally Posted by kossolax View Post
What about asynchronous function?

It will help for some optimization of big plugin: running a function in an other thread.
Isn't pawn still single threaded? (On that note, how can SQL queries run on a second thread?)
Potato Uno 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 14:32.


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