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

[CSS] function prototypes do not match


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MaxiMuM1441
Junior Member
Join Date: Jan 2013
Location: Germany
Old 05-23-2015 , 01:58   [CSS] function prototypes do not match
Reply With Quote #1

Hi, could some1 help me with my code? *new to pawn*

After adding
Quote:
public OnPluginStart()
{
CreateTimer(5.0, LoadStuff);
}

public Action:LoadStuff(Handle:timer)
{
PrintToServer("Loading stuff!");
}
to my code i cant compile it anymore.

here is my whole code:
Quote:
#include <sourcemod>
#include <sdktools>
#include <colors>
#include <timers>

public OnPluginStart( )
{
CreateTimer(5.0, Event_RoundStart);
HookEvent( "round_start", Event_RoundStart, EventHookMode_PostNoCopy );
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast, Handle:timer)
{
for(new client = 1; client <= MaxClients; client++)
if(IsClientInGame(client))

CPrintToChatEx(client, client, "{teamcolor}message");
}
like i said im new to pawn i pretty just copy pasted that code into my code

Errors:


greetz !!
__________________


...

Last edited by MaxiMuM1441; 05-23-2015 at 02:14.
MaxiMuM1441 is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 05-23-2015 , 02:28   Re: [CSS] function prototypes do not match
Reply With Quote #2

CreateTimer(5.0, Event_RoundStart);

Last edited by Darkness_; 05-23-2015 at 02:28.
Darkness_ is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-23-2015 , 06:30   Re: [CSS] function prototypes do not match
Reply With Quote #3

just change it to

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <colors>
#include <timers>

public OnPluginStart( )
{
HookEvent"round_start"Event_RoundStartEventHookMode_PostNoCopy );
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
for(new 
client 1client <= MaxClientsclient++) 
if(
IsClientInGame(client)) 

CPrintToChatEx(clientclient"{teamcolor}message");

Miu is offline
MaxiMuM1441
Junior Member
Join Date: Jan 2013
Location: Germany
Old 05-23-2015 , 08:41   Re: [CSS] function prototypes do not match
Reply With Quote #4

Quote:
Originally Posted by Miu View Post
just change it to

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <colors>
#include <timers>

public OnPluginStart( )
{
HookEvent"round_start"Event_RoundStartEventHookMode_PostNoCopy );
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
for(new 
client 1client <= MaxClientsclient++) 
if(
IsClientInGame(client)) 

CPrintToChatEx(clientclient"{teamcolor}message");

yea. that was my old code and you forgot to take out "#include <timers>" .
i would like to have a delay about 5 seconds until the message comes up on the next round.
__________________


...
MaxiMuM1441 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 05-23-2015 , 09:17   Re: [CSS] function prototypes do not match
Reply With Quote #5

PHP Code:
#include <sourcemod> 
#include <sdktools> 
#include <colors> 
#include <timers> 

public OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStartEventHookMode_PostNoCopy);
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    
CreateTimer(5.0LoadStuff);
}

public 
Action:LoadStuff(Handle:timer)
{
    for (new 
client 1client <= MaxClientsclient++)
        if (
IsClientInGame(client))
            
CPrintToChatEx(clientclient"{teamcolor}message");

Miu is offline
MaxiMuM1441
Junior Member
Join Date: Jan 2013
Location: Germany
Old 05-23-2015 , 09:27   Re: [CSS] function prototypes do not match
Reply With Quote #6

Quote:
Originally Posted by Miu View Post
PHP Code:
#include <sourcemod> 
#include <sdktools> 
#include <colors> 
#include <timers> 

public OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStartEventHookMode_PostNoCopy);
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    
CreateTimer(5.0LoadStuff);
}

public 
Action:LoadStuff(Handle:timer)
{
    for (new 
client 1client <= MaxClientsclient++)
        if (
IsClientInGame(client))
            
CPrintToChatEx(clientclient"{teamcolor}message");

Thanks man, works like it should.
Added you to the credits
__________________


...
MaxiMuM1441 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:53.


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