PenUltima Online

It is currently Sun Sep 07, 2008 3:03 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: syshook checkskill
PostPosted: Wed Apr 19, 2006 5:21 pm 
Offline

Joined: Wed Apr 19, 2006 12:29 pm
Posts: 42
Location: St. Peters, MO
Hey guys, I've got a little issue here.

I assumed my server was using a hooked checkskill function because it exists, but after adding a print statement for troubleshooting, I don't think it's working.

My syshook.cfg has the following entry:

Code:
SystemHookScript syshook_checkskill.ecl
{
   CheckSkill := NewCheckSkill
}


My syshook_checkskill.src has the following code:

Code:
program SyshookCheckSkill ( )

Syslog ( "Installing skillcheck..." );
return 1;

endprogram


My log contains the entry showing the installation:

Code:
[04/14 00:15:11] [pkg/character/skillcheck/syshook_checkskill.ecl]: Installing skillcheck...


So...it looks like my exported function should be working okay. However, I added a print statement to that function and it's the first line in the function, so regardless of whether it returns true or not, I should get the print statement in the console, thusly:

Code:
exported function NewCheckSkill ( character, skillid, difficulty, points )

Print ( "CheckSkill runs..." );


And yet, I get nothing in the console when the function is called. That tells me the server is using the core CheckSkill function. What have I not done right here?

Thanks!

_________________
Obstacles cannot crush me; every obstacle yields to Stern Resolve.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 5:42 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 8:08 am
Posts: 317
Location: Myrtle Beach, South Carolina
I remember talking to you in IRC channel. I could of swore I said don't put the := in the cfg file. lol. Sorry for putting it that way when I said, CheckSkill := exported function. I just ment CheckSkill is where you put the exported function. ehh. just look below, lol.

Code:
SystemHookScript syshook_checkskill.ecl
{
   CheckSkill NewCheckSkill
}


That should solve your problem.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 5:52 pm 
Offline

Joined: Wed Apr 19, 2006 12:29 pm
Posts: 42
Location: St. Peters, MO
Hey Unreal. Yeah man, we talked last night.

I guess I totally misunderstood you. What's interesting was, I added the := after talking to you, but it wasn't working before that.

What I did do was to move the program above the exported function definition.

In any event, I removed the := just now and tested and it works!

Thanks man.

_________________
Obstacles cannot crush me; every obstacle yields to Stern Resolve.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 7:42 pm 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
I tested your exported function and had no problems with it. I will talk to you tomorrow about this if we get time to meet up.

Anyway the problem I think you ran into deals with the other changes you made to other scripts also.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl