Raised This Month: $ Target: $400
 0% 

@ in front of function?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-16-2014 , 13:20   Re: @ in front of function?
Reply With Quote #1

@ is a shorthand for public. It's supposed to be used on events for readability reasons.

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
set_task(1.0"@say")
}

@
say()
{
    
server_print("AAAAAAAAAAAAAAA")

Output: AAAAAAAAAAAAAAA

Last edited by Backstabnoob; 07-16-2014 at 13:47.
Backstabnoob is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 07-16-2014 , 14:43   Re: @ in front of function?
Reply With Quote #2

Quote:
Originally Posted by hleV View Post
It means nothing.
Compile those two plugins i posted and you'll see that compiler thinks different.

Quote:
Originally Posted by Backstabnoob View Post
@ is a shorthand for public. It's supposed to be used on events for readability reasons.

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
set_task(1.0"@say")
}

@
say()
{
    
server_print("AAAAAAAAAAAAAAA")

Output: AAAAAAAAAAAAAAA
Thanks, i was pretty sure that @ stands for public, but i never saw someone using it.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
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 13:12.


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