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

Failing to Compile .SP Files?


Post New Thread Reply   
 
Thread Tools Display Modes
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 05-20-2015 , 01:31   Re: Failing to Compile .SP Files?
Reply With Quote #11

Quote:
Originally Posted by D3M0NiiCx View Post
It's a public timer xD

https://www.dropbox.com/sh/jxba7wuwt...FwptAN9Za?dl=0

There's all the files
added you.

there wasn't a timers.inc file in the zip. just timer.inc? have you modified the files at all?
__________________
versatile_bfg is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 05-20-2015 , 02:30   Re: Failing to Compile .SP Files?
Reply With Quote #12

PHP Code:
/**
 * Creates a timer associated with a new datapack, and returns the datapack.
 * @note The datapack is automatically freed when the timer ends.
 * @note The position of the datapack is not reset or changed for the timer function.
 *
 * @param interval            Interval from the current game time to execute the given function.
 * @param func                Function to execute once the given interval has elapsed.
 * @param datapack            The newly created datapack is passed though this by-reference 
 *                            parameter to the timer callback function.
 * @param flags                Timer flags.
 * @return                    Handle to the timer object.  You do not need to call CloseHandle().
 */
stock Handle:CreateDataTimer(Float:intervalTimer:func, &Handle:datapackflags=0)
{
    
datapack CreateDataPack();
    
flags |= TIMER_DATA_HNDL_CLOSE;
    return 
CreateTimer(intervalfuncdatapackflags);

This is from the actual SM include files. Not sure what is wrong with it atm. If someone has any idea that would help.

Edit:
Changing it to this fixes the error but not sure if that is correct:
PHP Code:
stock Handle:CreateDataTimer(Float:intervalfunc, &Handle:datapackflags=0
__________________

Last edited by versatile_bfg; 05-20-2015 at 02:51.
versatile_bfg is offline
D3M0NiiCx
Junior Member
Join Date: May 2015
Old 05-20-2015 , 16:02   Re: Failing to Compile .SP Files?
Reply With Quote #13

Quote:
Originally Posted by versatile_bfg View Post
PHP Code:
/**
 * Creates a timer associated with a new datapack, and returns the datapack.
 * @note The datapack is automatically freed when the timer ends.
 * @note The position of the datapack is not reset or changed for the timer function.
 *
 * @param interval            Interval from the current game time to execute the given function.
 * @param func                Function to execute once the given interval has elapsed.
 * @param datapack            The newly created datapack is passed though this by-reference 
 *                            parameter to the timer callback function.
 * @param flags                Timer flags.
 * @return                    Handle to the timer object.  You do not need to call CloseHandle().
 */
stock Handle:CreateDataTimer(Float:intervalTimer:func, &Handle:datapackflags=0)
{
    
datapack CreateDataPack();
    
flags |= TIMER_DATA_HNDL_CLOSE;
    return 
CreateTimer(intervalfuncdatapackflags);

This is from the actual SM include files. Not sure what is wrong with it atm. If someone has any idea that would help.

Edit:
Changing it to this fixes the error but not sure if that is correct:
PHP Code:
stock Handle:CreateDataTimer(Float:intervalfunc, &Handle:datapackflags=0
Also when you remove the Timer:func, the error goes away...
D3M0NiiCx is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-20-2015 , 22:57   Re: Failing to Compile .SP Files?
Reply With Quote #14

Seriously, don't change SourceMod include files.

Anyway, you'll get that error in CreateDataTimer if you have the wrong signature for the Timer function.

There are only 6ish valid signatures for timer functions (3 old syntax, 3 new syntax). They are:

Code:
public Action:Timer(Handle:timer, Handle:data) { }
public Action:Timer(Handle:timer, any:data) { }
public Action:Timer(Handle:timer) { }
public Action Timer(Handle timer, Handle data) { }
public Action Timer(Handle timer, any data) { }
public Action Timer(Handle timer) { }
There's also this new API variant that should also work because DataPack is a subclass of Handle:
Code:
public Action Timer(Handle timer, DataPack data) { }
Note: Timer should be replaced with the actual timer function name you want to use.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-20-2015 at 22:58.
Powerlord is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 05-20-2015 , 23:47   Re: Failing to Compile .SP Files?
Reply With Quote #15

Quote:
Originally Posted by Powerlord View Post
Seriously, don't change SourceMod include files.

Anyway, you'll get that error in CreateDataTimer if you have the wrong signature for the Timer function.

There are only 6ish valid signatures for timer functions (3 old syntax, 3 new syntax). They are:

Code:
public Action:Timer(Handle:timer, Handle:data) { }
public Action:Timer(Handle:timer, any:data) { }
public Action:Timer(Handle:timer) { }
public Action Timer(Handle timer, Handle data) { }
public Action Timer(Handle timer, any data) { }
public Action Timer(Handle timer) { }
There's also this new API variant that should also work because DataPack is a subclass of Handle:
Code:
public Action Timer(Handle timer, DataPack data) { }
Note: Timer should be replaced with the actual timer function name you want to use.
Yep, thats why we were asking the question. We knew it was wrong to do. Now we at least know there is a timer somewhere which is wrong now. Thanks.
__________________

Last edited by versatile_bfg; 08-06-2015 at 07:24.
versatile_bfg is offline
D3M0NiiCx
Junior Member
Join Date: May 2015
Old 05-21-2015 , 03:15   Re: Failing to Compile .SP Files?
Reply With Quote #16

Quote:
Originally Posted by Powerlord View Post
Seriously, don't change SourceMod include files.

Anyway, you'll get that error in CreateDataTimer if you have the wrong signature for the Timer function.

There are only 6ish valid signatures for timer functions (3 old syntax, 3 new syntax). They are:

Code:
public Action:Timer(Handle:timer, Handle:data) { }
public Action:Timer(Handle:timer, any:data) { }
public Action:Timer(Handle:timer) { }
public Action Timer(Handle timer, Handle data) { }
public Action Timer(Handle timer, any data) { }
public Action Timer(Handle timer) { }
There's also this new API variant that should also work because DataPack is a subclass of Handle:
Code:
public Action Timer(Handle timer, DataPack data) { }
Note: Timer should be replaced with the actual timer function name you want to use.
What file would we modify? & What line?
D3M0NiiCx is offline
D3M0NiiCx
Junior Member
Join Date: May 2015
Old 05-22-2015 , 21:07   Re: Failing to Compile .SP Files?
Reply With Quote #17

Quote:
Originally Posted by Powerlord View Post
Seriously, don't change SourceMod include files.

Anyway, you'll get that error in CreateDataTimer if you have the wrong signature for the Timer function.

There are only 6ish valid signatures for timer functions (3 old syntax, 3 new syntax). They are:

Code:
public Action:Timer(Handle:timer, Handle:data) { }
public Action:Timer(Handle:timer, any:data) { }
public Action:Timer(Handle:timer) { }
public Action Timer(Handle timer, Handle data) { }
public Action Timer(Handle timer, any data) { }
public Action Timer(Handle timer) { }
There's also this new API variant that should also work because DataPack is a subclass of Handle:
Code:
public Action Timer(Handle timer, DataPack data) { }
Note: Timer should be replaced with the actual timer function name you want to use.
Can you help out a little more?
D3M0NiiCx is offline
Zeddy_god
Senior Member
Join Date: May 2015
Location: Mumbai, India
Old 08-06-2015 , 03:24   Re: Failing to Compile .SP Files?
Reply With Quote #18

Bump. Having the same errors. Can anyone help me out? Exactly same compliling errors.
Zeddy_god is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 08-06-2015 , 10:05   Re: Failing to Compile .SP Files?
Reply With Quote #19

It doesn't help us if you don't post the code and the errors from the compiler.
Potato Uno is offline
Zeddy_god
Senior Member
Join Date: May 2015
Location: Mumbai, India
Old 08-06-2015 , 19:17   Re: Failing to Compile .SP Files?
Reply With Quote #20

I'm sorry but I'm terrible at coding. But I've tried to compile all the 50 .sps and over half of them have errors. Can someone please compile https://github.com/Zipcore/Timer and post it as a zip. If there's problems posting it here, please add me http://steamcommunity.com/id/bhushanmunde/
Any help will be very appreciated, thanks!
Zeddy_god 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 20:50.


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