Raised This Month: $ Target: $400
 0% 

New API and Syntax


Post New Thread Reply   
 
Thread Tools Display Modes
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 03-13-2015 , 15:37   Re: New API and Syntax
Reply With Quote #411

Quote:
Originally Posted by Dr. Greg House View Post
Tough decision, but direwolves > fennecs > structs.
What about dragons, cats, and tigers?
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 03-13-2015 , 21:00   Re: New API and Syntax
Reply With Quote #412

Is Sourcepawn ever going to be able to have Java-like strings like the following?
Code:
PrintToServer("Client index is " + client + " and here's some other random stuff like a string: " + someString);
Obviously not important but it might help get rid of some Format() lines.
__________________
~Wliu

Last edited by Wliu; 03-13-2015 at 21:01.
Wliu is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 03-13-2015 , 21:22   Re: New API and Syntax
Reply With Quote #413

Quote:
Originally Posted by Wliu View Post
Is Sourcepawn ever going to be able to have Java-like strings like the following?
Code:
PrintToServer("Client index is " + client + " and here's some other random stuff like a string: " + someString);
Obviously not important but it might help get rid of some Format() lines.
Code:
public OnPluginStart()
{
	PrintToServer("What's " ... "UP");
}
That's the closest atm. Variable do not seem to work. I believe it was discussed at some point. :/
__________________
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

Last edited by RedSword; 03-13-2015 at 21:29.
RedSword is offline
BAILOPAN
Join Date: Jan 2004
Old 03-14-2015 , 19:11   Re: New API and Syntax
Reply With Quote #414

Quote:
Originally Posted by Wliu View Post
Is Sourcepawn ever going to be able to have Java-like strings like the following?
Code:
PrintToServer("Client index is " + client + " and here's some other random stuff like a string: " + someString);
Obviously not important but it might help get rid of some Format() lines.
Yes. It is trickier than it may seem though. It won't happen for 1.8.
__________________
egg
BAILOPAN is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 03-14-2015 , 21:41   Re: New API and Syntax
Reply With Quote #415

Yesssss
Thanks!
__________________
~Wliu
Wliu is offline
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-17-2015 , 06:15   Re: New API and Syntax
Reply With Quote #416

What about more verbose compiling option?

Add a warning for every unused function/stock outside of includes directories
kossolax is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 03-17-2015 , 07:59   Re: New API and Syntax
Reply With Quote #417

Quote:
Originally Posted by kossolax View Post
What about more verbose compiling option?

Add a warning for every unused function/stock outside of includes directories
Unused functions are reported and unused stocks are not compiled, so there is no need to report them (and you should use them only via includes).
KissLick is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 03-17-2015 , 21:51   Re: New API and Syntax
Reply With Quote #418

I get this warning in SM 1.7 compiler:



Here is the code that the first warning refers to:

Code:
/**
 * Request to exec a query string as a threaded callback operation
 *
 * @param query        The query string to execute.
 * @param callback    Callback function or -1 for FastQuery.
 * @param data        Data to pass through to the callback function.
 */
native Console_RunQuery(MySqlCallback:callback=MySqlCallback:-1, char[] query, any data=0);
And here is the second warning code:

Code:
/**
 * Get the specified plugins settings
 *
 * @param serverid            The serverid to get the settings for.
 * @param pluginname        The name of the plugin to get the settings for.
 * @param callback            The callback function to call once the operation completes.
 */
native Console_GetPluginSettings(serverid, String:pluginname[], Console_GotPluginSettings_Callback:callback=Console_GotPluginSettings_Callback:-1);
How would I do the same thing using the new transitional syntax?
__________________
Neuro Toxin is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 03-18-2015 , 08:36   Re: New API and Syntax
Reply With Quote #419

Another question Bailopan: Will there be ways to test your code through special functions in future versions of Sourcepawn?
Examples: Junit, xUnit, Jasmine...
__________________
~Wliu
Wliu is offline
BAILOPAN
Join Date: Jan 2004
Old 03-18-2015 , 12:20   Re: New API and Syntax
Reply With Quote #420

I don't have any plans for that. Testing isn't a function of the language itself.
__________________
egg
BAILOPAN 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 23:21.


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