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

[ANY] Server Crontab


Post New Thread Reply   
 
Thread Tools Display Modes
Don.P1
New Member
Join Date: Sep 2009
Old 06-12-2010 , 05:08   Re: Server Crontab
Reply With Quote #111

has anyone an idea how i get it work with two different mapcycle files ? one for day and one for night ?

i edit the sc_job.cfg file :

sc_addjob ? ? 1 14 ? ? "mapcyclefile mapcycle night.txt"
sc_addjob ? ? 14 1 ? ? "mapcyclefile mapcycle.txt"

but there is no effect

pls help !!!

sorry for my bad english !!!
Don.P1 is offline
Silesti
Junior Member
Join Date: May 2010
Old 07-18-2010 , 08:55   Re: Server Crontab
Reply With Quote #112

This is so great plugin, but i keep getting this error:

L 07/16/2010 - 04:01:57: SourceMod error session started
L 07/16/2010 - 04:01:57: Info (map "cp_yukon_final") (file "errors_20100716.log")
L 07/16/2010 - 04:01:57: [SM] Native "CloseHandle" reported: Handle b100b1 is invalid (error 3)
L 07/16/2010 - 04:01:57: [SM] Displaying call stack trace for plugin "sc_module.smx":
L 07/16/2010 - 04:01:57: [SM] [0] Line 62, sc_module.sp::OnPluginEnd()

Whats wrong?


edit: fix is here http://forums.alliedmods.net/showpos...4&postcount=64

Last edited by Silesti; 07-18-2010 at 14:58.
Silesti is offline
einwad
Member
Join Date: Mar 2011
Location: Romania (Brazil)
Old 05-09-2011 , 07:07   Re: Server Crontab
Reply With Quote #113

Quote:
Originally Posted by FlyingMongoose View Post
At line 62 in sc_module:
Code:
KillTimer (g_hJobsTimer);
CloseHandle (g_hJobsTimer);



KillTimer calls CloseHandle, the handle will be invalidated thanks to KillTimer, remove CloseHandle.
So, I deleted that first CloseHandle and I was left with:

Code:
[57]  public OnPluginEnd ()
[58]  {
[59]     if (g_hJobsTimer != INVALID_HANDLE)
[60]     {
[61]         KillTimer (g_hJobsTimer);
[62]         g_hJobsTimer = INVALID_HANDLE;
[63]     }
[64]     if (g_hJobsTimeArray != INVALID_HANDLE)
[65]     {
[66]         ClearArray (g_hJobsTimeArray);
[67]         CloseHandle (g_hJobsTimeArray);
[68]         g_hJobsTimeArray = INVALID_HANDLE;
[69]     }
[70]     if (g_hJobsTaskArray != INVALID_HANDLE)
[71]     {
[72]         ClearArray (g_hJobsTaskArray);
[73]         CloseHandle (g_hJobsTaskArray);
[74]         g_hJobsTaskArray = INVALID_HANDLE;
[75]     }
[76]     if (g_hCronCallForward != INVALID_HANDLE)
[77]     {
[78]         CloseHandle (g_hCronCallForward);
[79]         g_hCronCallForward = INVALID_HANDLE;
[80]     }
[81] }
[82] 
[83] public bool:AskPluginLoad (Handle:myself, bool:late, String:error[], err_max)
[84] {
The problem is that when I try to compile, it says "
Code:
sc_module.sp<84> : warning 234: symbol "AskPluginLoad" is marked as deprecated: Use AskPluginLoad2<> instead.
I had scrontab.inc in the includes folder.
__________________
Mors tua, vita mea.

einwad is offline
Send a message via Skype™ to einwad
sipster19
Senior Member
Join Date: Mar 2011
Old 09-17-2011 , 17:16   Re: Server Crontab
Reply With Quote #114

Replace this with AskPluginLoad:

Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
    CreateNative ("SC_AddCronJob", Native_AddCronJob);
    CreateNative ("SC_RemoveCronJob", Native_RemoveCronJob);
    CreateNative ("SC_SearchCronJobId", Native_SearchCronJobId);
    CreateNative ("SC_GetNumberOfCronJobs", Native_GetNumberOfCronJobs);
    CreateNative ("SC_GetCronJobFromId", Native_GetCronJobFromId);
    CreateNative ("SC_RemoveAllCronJobs", Native_RemoveAllCronJobs);
    return APLRes_Success;
}
sipster19 is offline
Larsen
Senior Member
Join Date: Oct 2011
Old 10-30-2011 , 23:31   Re: Server Crontab
Reply With Quote #115

Yah, I can't get this to compile under 1.3.5, 1.3.9, or 1.4. I get "internal error".

@ Sipter: replace what?

*Edit: I also have this:


[
Quote:
Originally Posted by Don.P1 View Post
has anyone an idea how i get it work with two different mapcycle files ? one for day and one for night ?

i edit the sc_job.cfg file :

sc_addjob ? ? 1 14 ? ? "mapcyclefile mapcycle night.txt"
sc_addjob ? ? 14 1 ? ? "mapcyclefile mapcycle.txt"

but there is no effect

pls help !!!

sorry for my bad english !!!
__________________


Last edited by Larsen; 10-30-2011 at 23:34.
Larsen is offline
sipster19
Senior Member
Join Date: Mar 2011
Old 10-30-2011 , 23:36   Re: Server Crontab
Reply With Quote #116

I have attached a version with CloseHandle (g_hJobsTimer); removed and AskPluginLoad replaced with AskPluginLoad2.
Attached Files
File Type: sp Get Plugin or Get Source (sc.sp - 134 views - 6.7 KB)
File Type: sp Get Plugin or Get Source (sc_module.sp - 128 views - 10.4 KB)
sipster19 is offline
Larsen
Senior Member
Join Date: Oct 2011
Old 10-31-2011 , 18:59   Re: Server Crontab
Reply With Quote #117

Both failed to compile
__________________

Larsen is offline
theY4Kman
Join Date: Jun 2007
Location: Yak
Old 11-04-2011 , 17:07   Re: Server Crontab
Reply With Quote #118

The plug-in needs to be compiled on your own system, as it relies on the .inc file. Download sipster19's sc.sp and sc_module.sp and place them in the sourcemod/scripting folder. Then download the scrontab.inc file from the original plug-in post and place it in the sourcemod/scripting/include folder. To compile the plug-in, you can simply drag sc.sp onto the executable file named spcomp.

That should create the output sc.smx. If it doesn't, you'll have to compile the plug-in in a terminal or command prompt. Open one up (Start -> Run -> type "cmd"), navigate to the sourcemod/scripting folder (cd <location of sourcemod/scripting>), type "./spcomp sc.sp" without the quotes, and press Enter. It'll print some messages explaining why it's not compiling.
__________________
http://y4kstudios.com
Is that loud enough? Oh, while I have you, check out Viper.
theY4Kman is offline
Send a message via ICQ to theY4Kman Send a message via AIM to theY4Kman Send a message via MSN to theY4Kman Send a message via Yahoo to theY4Kman Send a message via Skype™ to theY4Kman
Larsen
Senior Member
Join Date: Oct 2011
Old 11-05-2011 , 05:52   Re: Server Crontab
Reply With Quote #119

I tried it under 1.3.9, and 1.4.0 under windows. I used the compile.exe, as the spcomp I'm guessing is for linux compile. It said "internal error"... press any key to exit. I did as you did, DLed sipster's .sp files, put the .inc file in the scripting/include folder, and stillno good :-/

Does it compile on yours?


**Edit: I'll jump on my win7 machine tomorrow and try it there. I'm using win2k on this old piece of crap maybe that's why it's no good lol, cuz I'm still getting internal error, and YES I know how to use dos :-(
__________________


Last edited by Larsen; 11-05-2011 at 07:00.
Larsen is offline
sipster19
Senior Member
Join Date: Mar 2011
Old 11-05-2011 , 15:32   Re: Server Crontab
Reply With Quote #120

Here are the exact steps how to compile them:

1. Download sourcemod
2. Extract the addons folder.
3. Navigate to the scripting folder.
4. Delete every sp file and the compile.sh
5. Place my versions of sc.sp and sp_module.sp in the scripting folder.
6. Download the scrotab.inc in the first post.
7. Place it in the scripting/include folder.
8. Run compile.exe
9. Navigate to scripting/compiled. The files are now compiled.
sipster19 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 08:20.


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