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

Bet


Post New Thread Reply   
 
Thread Tools Display Modes
ditmesteam
Senior Member
Join Date: Oct 2009
Old 01-20-2010 , 15:07   Re: Bet
Reply With Quote #21

My server have errors: (I only copy, after you read I will make shorter )
L 01/21/2010 - 03:05:24: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20100121.log")
L 01/21/2010 - 03:05:24: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:05:24: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:05:24: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:05:24: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:052: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:052: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:052: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:052: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:057: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:057: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:057: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:057: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:07:43: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:07:43: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:07:43: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:07:43: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:07:45: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:07:45: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:07:45: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:07:45: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:07:49: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:07:49: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:07:49: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:07:49: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:07:49: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:07:49: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:07:49: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:07:49: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:07:53: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:07:53: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:07:53: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:07:53: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:09:23: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:09:23: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:09:23: [AMXX] [0] bet.sma::Bet (line 222)
L 01/21/2010 - 03:09:23: [AMXX] [1] bet.sma::sayBet (line 162)

Last edited by ditmesteam; 01-20-2010 at 15:13.
ditmesteam is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-20-2010 , 15:21   Re: Bet
Reply With Quote #22

Quote:
Originally Posted by ditmesteam View Post
My server have errors: (I only copy, after you read I will make shorter )
L 01/21/2010 - 03:05:24: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20100121.log")
L 01/21/2010 - 03:05:24: [AMXX] Displaying debug trace (plugin "bet.amxx")
L 01/21/2010 - 03:05:24: [AMXX] Run time error 11: divide
L 01/21/2010 - 03:05:24: [AMXX] [0] bet.sma::Bet (line 219)
L 01/21/2010 - 03:05:24: [AMXX] [1] bet.sma::sayBet (line 162)
L 01/21/2010 - 03:052: [AMXX] Displaying debug trace (plugin "bet.amxx")
Wow! I made that bug accidentally while fixing something. Shame on me. Fixed. Thanks for the tip
vilaemail is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 01-20-2010 , 17:00   Re: Bet v1.2
Reply With Quote #23

Quote:
Originally Posted by vilaemail View Post
-Implemented
-I am not quite sure what do you think. This variables (now constants):
-As seen on AMX Mod X documentation if a message is started before other one is completed server will crash. So if (teoreticaly) two players die at same point and two functions are called at same point it could result in server crash. Ofcourse it is possible AMXX does not work that way (it processes two same type events one after another).
PHP Code:
static argCheck[32]
read_argv(1,argCheck,31)
//get args
static argCmd[5], arg1[8], arg2[8
- This might not be a critical optimization but well, you should get used to using statics where they are useful and feasible. Read this (and probably the whole article while you're at it): http://wiki.amxmodx.org/Optimizing_P...atic_vs_Global
- AMXX is not multithreaded and I suppose that will never happen. The documentation extract you refer to means that you should not start messages within another message or do this:
PHP Code:
message_begin( ... );
message_begin( ... )
//.. 
To find out the language names for your list check the "languages.txt" in the /data/langs directory. [sv] for example is Swedish.
__________________
In Flames we trust!

Last edited by Nextra; 01-20-2010 at 17:08.
Nextra is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-20-2010 , 17:07   Re: Bet v1.2
Reply With Quote #24

Quote:
Originally Posted by Nextra View Post
PHP Code:
static argCheck[32]
read_argv(1,argCheck,31)
//get args
static argCmd[5], arg1[8], arg2[8
- This might not be a critical optimization but well, you should get used to using statics where they are useful and feasible. Read this (and probably the whole article while you're at it): http://wiki.amxmodx.org/Optimizing_P...atic_vs_Global
- AMXX is not multithreaded and I suppose that will never happen.

To find out the language names for your list check the "languages.txt" in the /data/langs directory. [sv] for example is Swedish.
Thanks, will read and fix bugs. Any other suggestions?

Do what? What are you trying to say with that code block?
vilaemail is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 01-20-2010 , 17:09   Re: Bet
Reply With Quote #25

Not yet, but I updated my previous post once more.

/edit: I mean that you execute message_begin again before you message_end the other.
__________________
In Flames we trust!
Nextra is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-20-2010 , 17:16   Re: Bet
Reply With Quote #26

Quote:
Originally Posted by Nextra View Post
Not yet, but I updated my previous post once more.

/edit: I mean that you execute message_begin again before you message_end the other.
Ah yes i understand now. There is a big BUT when using static's. I must think will function be called recursively. And if it is it might introduce serious bugs . Though sayBet can not be called recursively I will implement it to that function.
vilaemail is offline
ditmesteam
Senior Member
Join Date: Oct 2009
Old 01-20-2010 , 21:52   Re: Bet
Reply With Quote #27

I tested, all bugs have fixed. But when I say "bet", do not display: BET_HELP = Use ^"bet team amount^" to bet. Examples: ^"bet t all^" or ^"bet ct 250^" or ^"bet t half^"
When type "bet", display: INVALID_TEAM = Invalid team name ^"%s^". Please use t or ct to target a team.
ditmesteam is offline
kobatz
Junior Member
Join Date: Mar 2008
Old 01-20-2010 , 22:59   Re: Bet
Reply With Quote #28

I dont know about you but this plugin is working perfectly on my server ;) cheers
kobatz is offline
ditmesteam
Senior Member
Join Date: Oct 2009
Old 01-21-2010 , 02:49   Re: Bet
Reply With Quote #29

Can you make: Everybody can see player who say chat: bet ct all
They see and can do the same!
ditmesteam is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 01-21-2010 , 04:00   Re: Bet
Reply With Quote #30

Quote:
Originally Posted by ditmesteam View Post
I tested, all bugs have fixed. But when I say "bet", do not display: BET_HELP = Use ^"bet team amount^" to bet. Examples: ^"bet t all^" or ^"bet ct 250^" or ^"bet t half^"
When type "bet", display: INVALID_TEAM = Invalid team name ^"%s^". Please use t or ct to target a team.
Please check if you are typing "bet" or "bet " (notice the space). Then get back to me with the results
EDIT: Bug fixed.

Quote:
Originally Posted by ditmesteam View Post
Can you make: Everybody can see player who say chat: bet ct all
They see and can do the same!
Yes, I will make a cvar to set that
I removed it from chat because some think it is excessive spam. With cvar everybody will be happy. Please wait a couple of hours until I update plugin and retest it. Thanks.

Last edited by vilaemail; 01-21-2010 at 04:35.
vilaemail 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 18:32.


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