It is currently Wed Nov 19, 2008 4:04 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [Pol 097 2006 10 29 RC Coregina] repsys bug
PostPosted: Wed Nov 08, 2006 4:30 am 
Offline

Joined: Tue Feb 07, 2006 10:36 am
Posts: 52
Location: Rome, Italy
In OnAttack hook ( i dont' know if it happens even in the other hooks), if i use attacker.setcriminal(1), after running that istruction, the hook function terminates itself without running the rest of code. Moreover it happens something as the hook returned 0, and the pol uses his reputation system code for hook.
I make an example:

Code:
exported function OnAttack(attacker, defender)
   if ( attacker.serial == defender.serial )
      // Safe to attack.. yourself?
      return 1;
   elseif ( defender.master )
      // Check for the npc's master.
      return OnAttack(attacker, defender.master);
   elseif ( IsInnocentTo(defender, attacker) )
      // Reset the criminal timer for the attacker.
      attacker.SetCriminal(1);
   endif
PrintTextAbovePrivate( defender, "*"+attacker.name+" is attacking you!*" , defender);
endfunction

if attacker.SetCriminal is called the printtextabove is red as pol default repsys...

_________________
VenuS Admin Scripter on M4D

http://www.uovenus.net


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 08, 2006 9:18 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 428
Location: San Diego, California
Tested and confirmed. I'll look into it soon.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 8:27 am 
Offline

Joined: Tue Feb 07, 2006 10:36 am
Posts: 52
Location: Rome, Italy
Austin wrote:
Tested and confirmed. I'll look into it soon.


what about this bug?

i haven't seen it fixed in the last release.

_________________
VenuS Admin Scripter on M4D

http://www.uovenus.net


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 9:21 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 428
Location: San Diego, California
Its a very big project to fix it right now.. and I just haven't had the motivation to do-so.

There are pain-in-the-ass work-arounds anyway by storing criminal and murderer timers in cprops rather than relying on overlapping (there-in is the problem) core threads.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 19, 2007 11:00 am 
Offline

Joined: Tue Feb 07, 2006 10:36 am
Posts: 52
Location: Rome, Italy
Austin wrote:
Its a very big project to fix it right now.. and I just haven't had the motivation to do-so.



drink a Red Bull, Red Bull Gives You Wings :D

_________________
VenuS Admin Scripter on M4D

http://www.uovenus.net


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 7:11 pm 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
Is it currently safe (bug free) to use the highlight/namecolour repsys hooks?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 24, 2007 12:06 am 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
Is it?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 01, 2007 4:19 pm 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
Three in a row :P Anyone know the answer?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 5:04 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 428
Location: San Diego, California
Well it is safe as in it won't cause a crash, it never did.
What is not safe is that if you use the SetCriminal(x>0) or SetMurderer(x>0) methods in the hook, it causes it to stop at that point and the core finishes it.

You have to work around that limitation.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 2:31 pm 
Offline

Joined: Thu Jan 18, 2007 2:34 am
Posts: 91
Ah thanks a lot for that Austin, cleared it up :smile:


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 19, 2008 11:10 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 225
Sorry if this is totally wrong thread, just didn't see this post worth of its own just yet...

Have you thought of moving the whole reputation system out from the core? I mean, doing system that does not rely on syshooks (and definitely not on packethooks). Lots of work I bet, but it might solve the (coming) issues once and for all AND make it more versatile for shard spesific customizations.

You don't have to be a core developer to be able to modify (, debug and fix!) a scripted system. I'd like to know if there is something critical relying on the reputation system that makes the whole idea impossible? Or just too hard to do.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 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