Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-09-22 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
September 21, 2012, 09:59:45 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: 1.0.9b  (Read 3176 times)
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« on: May 29, 2010, 06:45:35 PM »

www.ownageclan.com/war3source

1.0.9b for TF2 and CSS

new natives for cooldown management, so races do not have to keep track themselves
for examples see Corrupted Disciple, which has a cooldown ability, skill, and ultimate


/**
 * cooldown manager
 * basically self explainatory parameters, creates a cooldown for a skill (term skill used here is generic for skill/ability/ultimate)
 * printMsgOnExpireByTime prints message to client (if alive and same race) when this skill expires by time (will not print when expired by spawn or death or force reset)
 * CooldownPrintMsgName[] is the name of the skill that will be printed: ie Voodoo is ready. You pass "Voodoo".  
 * If left empty, it will say "Ability" for skillnum 0-2 and "Ultimate"
 * This string will also be used in War3_PrintSkillIsNotReady and is the only way to set it. you should never call  War3_PrintSkillIsNotReady before calling this manager
 * If there is a skill that has cooldown but not counted as an ability, you should not have it print on expiration
 *
 * when a cooldown expires (by time, by death, by spawn, by force reset), it will forward to OnCooldownExpired(....) forward, use if u need to
 * @noreturn
 */  
native War3_CooldownMGR(client,Float:cooldownTime,raceid,skillNum,bool:resetOnSpawn=true,bool:resetOnDeath=true,bool:printMsgOnExpireByTime=true,String:CooldownPrintMsgName[]="");  



/**
 * how much time is left on this particular cooldown?
 * returns an int (rounted up from the float)
 */  
native War3_CooldownRemaining(client,raceid,skillNum);  


/**
 * basically make this cooldown expire, expiring is not considered "by time"
 */  
native War3_CooldownReset(client,raceid,skillNum);  


/**
 * is this skill NOT in COOLDOWN? YOU NEED TO CHECK IF CLIENT HAS LEVELED THIS SKILL FIRST, THIS IS ONLY COOLDOWN RELATED
 * you would only do this if this skill has a cooldown and u called War3_CooldownMGR
 * printTextIfNotReady=true will print a not ready message
 */  
native bool:War3_SkillNotInCooldown(client,raceid,skillNum,bool:printTextIfNotReady=false);  


/**
 * prints Ability/Ultimate Is Not Ready or something
 * the String can replace "Ultimate", its copied from the creation of CooldownMGR
 */  
native War3_PrintSkillIsNotReady(client,raceid,skillNum);


implemented corrupted disciple with cooldown manager
implemented shadowhunter with cooldown manager
implemented human with cooldown manager
implemented orc with cooldown manager
implemented night elf with cooldown manager
implemented blood mage with cooldown manager
implemented warden with cooldown manager
implemented crypt lord with cooldown manager
(we left out undead for now)
« Last Edit: May 29, 2010, 08:07:23 PM by Ownz » Logged

DarkEnergy
ZombieGun
Newbie
*
Posts: 31


View Profile Email
« Reply #1 on: May 30, 2010, 07:35:01 PM »

If you are running a TF2 server, I strongly suggest you do not update with this version.

Very unstable and causes more bugs with the races.
Logged
saintk
Jr. Member
**
Posts: 71


View Profile Email
« Reply #2 on: June 01, 2010, 06:54:18 AM »

we had to revert to 1.0.8b as well.

#edit

We have 1 user who prolly has a corrupt entry in the database. His XP never loads and never gets the menu's. As soon as he joins server with v1.0.9b crashes. I'll do some more researching tonight.

#edit 2
Someone looked at the DB and noticed this (i quote him cause i don't know mysql myself) "he's not getting an entry in the main table". When we deleted the entire entry, it still didn't populate it correctly. Only after we added the details manually the crashing stopped. (crash occurred roughly 1 minute after the player joined)
« Last Edit: June 01, 2010, 10:45:26 AM by saintk » Logged
ZombieGun
Newbie
*
Posts: 31


View Profile Email
« Reply #3 on: June 01, 2010, 02:31:59 PM »

1.0.8 still crashed for me as did 1.0.7.

I went back to 1.0.6 and have no problems what so ever.

So whatever they did, they did it in 1.0.7. I would start looking there.
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #4 on: June 01, 2010, 02:40:43 PM »

it looks like modification in 1.0.7 which is a database retrieval change is causing crashes, ill look into this
Logged

DarkEnergy
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #5 on: June 01, 2010, 04:17:43 PM »

hey guys, iv added in many error reporting triggers and renamed many functions to help with debugging, would anyone please run war3source 1.0.9bfix1 and look at error logs if anyone crashes?

i have removed the retry function so hopefully thats one less thing that can crash

www.ownageclan.com/war3source
Logged

DarkEnergy
saintk
Jr. Member
**
Posts: 71


View Profile Email
« Reply #6 on: June 02, 2010, 08:03:10 AM »

I'll have a go on it tonight.

Cheers

#edit

We've tested it for several hours now. so far so good. That user i mentioned earlier still encounters a issue. For some weird reason the credits aren't stored for him.

This is the error log:
Quote
L 06/02/2010 - 21:53:28: [War3Source.smx] (-1) SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Hare',currentrace='undead',credits='8',total_level='13',total_xp='675',last_seen' at line 1
L 06/02/2010 - 21:53:28: [War3Source.smx] [War3Source] ERROR: Saving player data main failed! Check DATABASE settings! (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Hare',currentrace='undead',credits='8',total_level='13',total_xp='675',last_seen' at line 1)
L 06/02/2010 - 21:57:09: [War3Source.smx] (-1) SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Hare',currentrace='orc',credits='1',total_level='13',total_xp='696',last_seen='1' at line 1
L 06/02/2010 - 21:57:09: [War3Source.smx] [War3Source] ERROR: Saving player data main failed! Check DATABASE settings! (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Hare',currentrace='orc',credits='1',total_level='13',total_xp='696',last_seen='1' at line 1)
L 06/02/2010 - 21:58:35: [War3Source.smx] (-1) SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Hare',currentrace='orc',credits='1',total_level='13',total_xp='696',last_seen='1' at line 1
L 06/02/2010 - 21:58:35: [War3Source.smx] [War3Source] ERROR: Saving player data main failed! Check DATABASE settings! (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Hare',currentrace='orc',credits='1',total_level='13',total_xp='696',last_seen='1' at line 1)

This user's name is  "Bucky O'Hare", it seems its having issues with his player name or something?
« Last Edit: June 02, 2010, 02:02:41 PM by saintk » Logged
Naris
Jr. Member
**
Posts: 60


View Profile Email
« Reply #7 on: June 02, 2010, 04:27:24 PM »

This user's name is  "Bucky O'Hare", it seems its having issues with his player name or something?

It's the ' character, which is used to quote strings in SQL. The ' in his name screws up the syntax.

Ownz needs to add code to escape any names before placing them into the query
http://docs.sourcemod.net/api/index.php?fastload=show&id=838&
« Last Edit: June 02, 2010, 04:30:29 PM by Naris » Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #8 on: June 02, 2010, 10:12:32 PM »

yes i was expecting players with bad names. at least this time it doesnt crash (yet?)
Logged

DarkEnergy
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #9 on: June 02, 2010, 10:41:20 PM »

*sign* im just going to choose not to deal with these people and simply remove ' from their names
Logged

DarkEnergy
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #10 on: June 02, 2010, 10:46:02 PM »

implemented in 1.0.9b fix 2

www.ownageclan.com/war3source
Logged

DarkEnergy
iceman
Full Member
***
Posts: 160



View Profile
« Reply #11 on: June 03, 2010, 05:11:28 AM »

Hey I got these logs yesterday running 1.0.9 fix 1. no crashes yet.

Quote
L 06/01/2010 - 13:06:37: Error log file session closed.
L 06/02/2010 - 16:45:20: SourceMod error session started
L 06/02/2010 - 16:45:20: Info (map "koth_sawmill") (file "errors_20100602.log")
L 06/02/2010 - 16:45:20: [War3Source\War3Source.smx] (-1) SQL error: near "m": syntax error
L 06/02/2010 - 16:45:20: [War3Source\War3Source.smx] T_CallbackInsertPDataMain query=invalid handle
L 06/02/2010 - 16:47:35: [War3Source\War3Source.smx] (-1) SQL error: near "m": syntax error
L 06/02/2010 - 16:47:35: [War3Source\War3Source.smx] T_CallbackInsertPDataMain query=invalid handle
L 06/02/2010 - 16:58:37: Error log file session closed.
L 06/02/2010 - 16:59:00: SourceMod error session started
L 06/02/2010 - 16:59:00: Info (map "koth_nucleus") (file "errors_20100602.log")
L 06/02/2010 - 16:59:00: [War3Source\War3Source.smx] (-1) SQL error: near "m": syntax error
L 06/02/2010 - 16:59:00: [War3Source\War3Source.smx] T_CallbackInsertPDataMain query=invalid handle
L 06/02/2010 - 17:23:47: [War3Source\War3Source.smx] (-1) SQL error: near "m": syntax error
L 06/02/2010 - 17:23:47: [War3Source\War3Source.smx] T_CallbackInsertPDataMain query=invalid handle
L 06/02/2010 - 17:24:10: [War3Source\War3Source.smx] (-1) SQL error: near "m": syntax error
L 06/02/2010 - 17:24:10: [War3Source\War3Source.smx] T_CallbackInsertPDataMain query=invalid handle
L 06/02/2010 - 17:34:34: Error log file session closed.
Logged
saintk
Jr. Member
**
Posts: 71


View Profile Email
« Reply #12 on: June 03, 2010, 05:57:44 AM »

fix 2:

So far so good, credits issue with user has been solved. No crashes yet!
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #13 on: June 03, 2010, 02:58:53 PM »

near "m" LOL

get on fix2 if u havent already
Logged

DarkEnergy
Naris
Jr. Member
**
Posts: 60


View Profile Email
« Reply #14 on: June 03, 2010, 08:56:46 PM »

*sign* im just going to choose not to deal with these people and simply remove ' from their names

It's better, and easier, to use SQL_EscapeString() to escape the string that to just strip '
That way any other goofy characters will also be dealt with.
http://docs.sourcemod.net/api/index.php?fastload=show&id=838&
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #15 on: June 04, 2010, 10:31:01 AM »

heres the thing, it if escapes the ' , then why can i just replace ' with \'
and why do i need to pass a database handle
Logged

DarkEnergy
Naris
Jr. Member
**
Posts: 60


View Profile Email
« Reply #16 on: June 04, 2010, 05:12:52 PM »

heres the thing, it if escapes the ' , then why can i just replace ' with \'
and why do i need to pass a database handle

It doesn't just escape ' characters.
Quote
This function ensures that any unsafe characters are safely escaped according to the database engine and the database's character set.
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #17 on: June 04, 2010, 05:42:40 PM »

its fine for now

and what about fix2? has it been crashing and are there any other error logs?
Logged

DarkEnergy
saintk
Jr. Member
**
Posts: 71


View Profile Email
« Reply #18 on: June 05, 2010, 04:22:24 AM »

It's not crashing for us.

Here's some error logging:
Code:
L 06/03/2010 - 18:16:21: Info (map "pl_goldrush") (file "errors_20100603.log")
L 06/03/2010 - 18:16:21: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:16:21: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:16:21: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:16:22: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:16:22: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:16:22: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:16:22: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:16:22: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:16:22: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:16:22: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:16:22: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:16:22: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:16:23: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:16:23: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:16:23: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:16:23: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:16:23: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:16:23: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:17:08: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:17:08: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:17:08: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:18:28: [SM] Plugin encountered error 15: Array index is out of bounds
L 06/03/2010 - 18:18:28: [SM] Displaying call stack trace for plugin "War3Source_002_HumanAlliance.smx":
L 06/03/2010 - 18:18:28: [SM]   [0]  Line 133, War3Source_002_HumanAlliance.sp::OnUltimateCommand()
L 06/03/2010 - 18:40:32: Error log file session closed.
L 06/04/2010 - 20:27:07: SourceMod error session started
L 06/04/2010 - 20:27:07: Info (map "pl_goldrush") (file "errors_20100604.log")
L 06/04/2010 - 20:27:07: [SM] Native "PrintHintText" reported: Client 2 is not in game
L 06/04/2010 - 20:27:07: [SM] Displaying call stack trace for plugin "War3Source_006_ShadowHunter.smx":
L 06/04/2010 - 20:27:07: [SM]   [0]  Line 183, War3Source_006_ShadowHunter.sp::EndVoodoo()
L 06/04/2010 - 21:04:23: Error log file session closed.

There also seems to be something wrong with the ring of regen, it heals faster than a medic.
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #19 on: June 05, 2010, 01:11:06 PM »

wtf
Logged

DarkEnergy
binaryblade
Newbie
*
Posts: 3


View Profile
« Reply #20 on: June 07, 2010, 01:50:26 AM »

I agree with Naris, the SQL_EscapeString would be the correct way to sanitize the database input. http://xkcd.com/327/

The thing I don't get is why did this problem pop up now? the previous structure wasn't escaped either. What is it about the new ordering that either created the problem or made the problem more apparent?
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #21 on: June 07, 2010, 08:36:58 PM »

no idea, then again debug messages werent there before
Logged

DarkEnergy
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #22 on: June 07, 2010, 08:42:10 PM »

and fyi sql injection doesnt work cuz they only accept 1 command per query
Logged

DarkEnergy
saintk
Jr. Member
**
Posts: 71


View Profile Email
« Reply #23 on: June 08, 2010, 08:39:15 AM »

Hi,

We have another health issue, this time with the humans. you start off with the extra health and it keeps going -1 +1 around the figure it should be. If you take a single hit it drops down to your default health. Sometimes when your damaged the health suddenly starts adding again.

Cheers,
Logged
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #24 on: June 08, 2010, 04:48:18 PM »

its the way it is, it heals you to +X hp, and tries to keep you there because the buffed hp decays. when you are hit you lose buff potential. it heals you again if you are at max health if you are not damaged in 10 seconds
Logged

DarkEnergy
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!