Jump to content
  • 0
Tio Akima

combat arena error

Question

8 answers to this question

Recommended Posts

  • 1
  On 3/12/2020 at 4:46 AM, Tio Akima said:

 

hi Cretino, Thanks for the answer..
I did a test with two fighters ... And when one of them dies, the prize label is not triggered.
the console error

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: strcharinfo (1 parameter):
[Debug]: Data: number value=0

I made a little mistake, now is tested and working:

  Reveal hidden contents

 

Share this post


Link to post
Share on other sites
  • 1
  On 3/12/2020 at 10:28 PM, Tio Akima said:

oh nice... I tested it with OnPCLogoutEvent:
but... he warned that the player gave up, but did not trigger the label OnArenaEvntCheck; LOL
 

he stopped for here:

FeI0wNZ.png

I made some changes, now is working fine.

 

OnPCDieEvent part:

  Reveal hidden contents

 

OnPCLogoutEvent part:

  Reveal hidden contents

 

Share this post


Link to post
Share on other sites
  • 0
  On 3/11/2020 at 10:30 PM, Tio Akima said:

guys, someone help me fix this script

it is not working properly.

sometimes he announces as a winner the player who is dead

gives the prize to the wrong player ... etc

 

https://pastebin.com/eFv2B5QX

 

this is a combat arena where the last to survive is the winner.

Not tested, but I think now is working fine.

  Reveal hidden contents

 

Share this post


Link to post
Share on other sites
  • 0
  On 3/12/2020 at 4:17 AM, Cretino said:

Not tested, but I think now is working fine.

  Reveal hidden contents

 

 

hi Cretino, Thanks for the answer..
I did a test with two fighters ... And when one of them dies, the prize label is not triggered.
the console error

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: strcharinfo (1 parameter):
[Debug]: Data: number value=0

Share this post


Link to post
Share on other sites
  • 0
  On 3/12/2020 at 1:41 PM, Cretino said:

I made a little mistake, now is tested and working:

  Reveal hidden contents

 

yeah, now it's great. LOL
Thanks for your help.
do you think the logic used to decremented the variable when a player dies, is good?
Because I just thought about a future error ... if a player quits, the variable will not be decremented, and this can cause a failure.

I thought about using "getmapusers" but, maybe he can make a mistake in counting, if he also counts the dead player on the map.  o/

Share this post


Link to post
Share on other sites
  • 0
  On 3/12/2020 at 4:32 PM, Tio Akima said:

yeah, now it's great. LOL
Thanks for your help.
do you think the logic used to decremented the variable when a player dies, is good?
Because I just thought about a future error ... if a player quits, the variable will not be decremented, and this can cause a failure.

I thought about using "getmapusers" but, maybe he can make a mistake in counting, if he also counts the dead player on the map.  o/

'getmapusers' only will count a 'dead player' if he still in the map... but you already added this:

  Reveal hidden contents

When a player die, it send back to 'kame_house',

 

Now about the the quit players you can do this:

Add:

  Reveal hidden contents

 

And change these:

 

OnPCDieEvent part:

  Reveal hidden contents

 

Enter arena part:

  Reveal hidden contents

 

I think is it, not tested.

Edited by Cretino

Share this post


Link to post
Share on other sites
  • 0
  On 3/12/2020 at 8:37 PM, Cretino said:

'getmapusers' only will count a 'dead player' if he still in the map... but you already added this:

  Reveal hidden contents

When a player die, it send back to 'kame_house',

 

Now about the the quit players you can do this:

Add:

  Reveal hidden contents

 

And change these:

 

OnPCDieEvent part:

  Reveal hidden contents

 

Enter arena part:

  Reveal hidden contents

 

I think is it, not tested.

oh nice... I tested it with OnPCLogoutEvent:
but... he warned that the player gave up, but did not trigger the label OnArenaEvntCheck; LOL
 

he stopped for here:

FeI0wNZ.png

Share this post


Link to post
Share on other sites
  • 0
  On 3/13/2020 at 3:55 AM, Cretino said:

I made some changes, now is working fine.

 

OnPCDieEvent part:

  Reveal hidden contents

 

OnPCLogoutEvent part:

  Reveal hidden contents

 

thanks Cretino. it's perfect! thanks for your help.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.