Raised This Month: $32 Target: $400
 8% 

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-03-2016 , 06:17   Re: New API and Syntax
Reply With Quote #731

The plugin that created the pack owns it, you're not allowed to mutate it - you need to create your own clone, this has nothing to do with the new syntax. Also, setting the position to 0 is NOT equivalent to resetting it.
__________________

Last edited by asherkin; 05-03-2016 at 06:18.
asherkin is offline
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 05-03-2016 , 08:06   Re: New API and Syntax
Reply With Quote #732

Quote:
Originally Posted by asherkin View Post
The plugin that created the pack owns it, you're not allowed to mutate it - you need to create your own clone, this has nothing to do with the new syntax.
You have right, I didn't know that. Thanks for your reply.
kossolax is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 05-03-2016 , 15:39   Re: New API and Syntax
Reply With Quote #733

You could use Dynamic for cross plugin data storage.
__________________
Neuro Toxin is offline
aleeexxx
Member
Join Date: May 2014
Location: Valhalla
Old 05-15-2016 , 23:56   Re: New API and Syntax
Reply With Quote #734

PHP Code:
decl Float:MyFloat[10
is equal to?

I think:
PHP Code:
float MyFloat[10
__________________
aleeexxx is offline
Send a message via MSN to aleeexxx
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-16-2016 , 07:03   Re: New API and Syntax
Reply With Quote #735

Quote:
Originally Posted by alejandrosc View Post
PHP Code:
decl Float:MyFloat[10
is equal to?

I think:
PHP Code:
float MyFloat[10
ya, only difference is the 2nd version initializes the array to 0.0 throughout the entire array where decl doesn't and leaves garbage.
WildCard65 is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 07-25-2016 , 14:41   Re: New API and Syntax
Reply With Quote #736

sorry for revive, i back to sourcepawn and i read the tutorial but i not see the diference:

void DoStuff(float x, int y, char[] name, int length)

with this:

SetPlayerName(int player, const char[] name);

What is the purpose of const word before the char word?
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-25-2016 , 14:57   Re: New API and Syntax
Reply With Quote #737

It indicates that the called function will not modify the contents of the array.
__________________
asherkin is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 07-31-2016 , 02:28  
Reply With Quote #738

Please explain to me how to correctly convert integers to floating-point numbers.

If
Quote:
fNum = view_as<float>(iNum);
then fNum allways equals 0.0
but
Quote:
fNum = iNum + 0.0;
allways gives the correct result.
Grey83 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-31-2016 , 04:18   Re: New API and Syntax
Reply With Quote #739

fNum = float(iNum)
__________________
asherkin is offline
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 08-07-2016 , 21:07   Re: New API and Syntax
Reply With Quote #740

Can someone guide me to the 1.8 Syntax/Guide because I get over 100 Warnings/Errors now.

__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
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 01:19.


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