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

Solved new-style declarations are required [CS:GO - HELP] ???


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-15-2018 , 12:48   new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #1

Hey, can someone help me here out?

my Code:

PHP Code:
public void OnPluginStart()
{
    
RegAdminCmd("sm_mycmd"MYCMDADMFLAG_GENERIC"my cmd");
}

public 
Action:MYCMD(clientargs)
{
    
// my code

if i gona compile it on SourceMod Plugin Compiler and spider.limetech.io

this Error will come after i compile it:

Code:
warning 217: loose indentation
error 147: new-style declarations are required
please help.

Last edited by iskenderkebab33; 11-03-2018 at 17:33.
iskenderkebab33 is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 07-15-2018 , 13:09   Re: new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=290805
public Action MYCMD(int client, int args)

Last edited by Indarello; 07-15-2018 at 13:12.
Indarello is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-15-2018 , 13:11   Re: new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #3

Quote:
Originally Posted by Indarello View Post
sooo, how can i fix this?

Last edited by iskenderkebab33; 07-15-2018 at 13:12.
iskenderkebab33 is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-15-2018 , 13:38   Re: new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #4

Quote:
Originally Posted by Indarello View Post
https://forums.alliedmods.net/showthread.php?t=290805
public Action MYCMD(int client, int args)
same error again

EDIT: nmd forgot to remove :

Last edited by iskenderkebab33; 07-15-2018 at 13:40.
iskenderkebab33 is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 07-15-2018 , 14:03   Re: new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #5

You should be able to remove '#pragma newdecls required' from the top and it would compile fine if you're trying to compile something already premade and fairly large.
Drixevel is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 07-15-2018 , 19:38   Re: new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #6

Or just code in the new syntax.

Code:
public void OnPluginStart() 
{ 
    RegAdminCmd("sm_mycmd", MYCMD, ADMFLAG_GENERIC, "my cmd"); 
} 

public Action MYCMD(int client, int args) 
{ 
    // my code 
}
__________________
Neuro Toxin is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 07-15-2018 , 19:41   Re: new-style declarations are required [CS:GO - HELP] ???
Reply With Quote #7

Here is the tutorial of the new syntax: https://wiki.alliedmods.net/Introduc...SourcePawn_1.7
__________________
micapat 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 01:52.


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