Must go for weekend
- The Beatles
- Fear me for I am root
- Posts: 6285
- Joined: Tue May 24, 2005 8:12 pm
- Ruddertail
- Promi Diplomacy ate my homework...
- Posts: 4510
- Joined: Wed May 12, 2004 11:39 pm
- Location: Chances are, playing FAF.
- Contact:
- Alcaline the Badger
- Advanced Member
- Posts: 85
- Joined: Mon Mar 08, 2004 8:25 pm
- Ruddertail
- Promi Diplomacy ate my homework...
- Posts: 4510
- Joined: Wed May 12, 2004 11:39 pm
- Location: Chances are, playing FAF.
- Contact:
- Ruddertail
- Promi Diplomacy ate my homework...
- Posts: 4510
- Joined: Wed May 12, 2004 11:39 pm
- Location: Chances are, playing FAF.
- Contact:
- Ruddertail
- Promi Diplomacy ate my homework...
- Posts: 4510
- Joined: Wed May 12, 2004 11:39 pm
- Location: Chances are, playing FAF.
- Contact:
- Slasher
- The FAF Forums SMEGHEAD!!! lol
- Posts: 2635
- Joined: Mon May 03, 2004 5:08 pm
- Location: http://florida4us.com/
- Contact:
- Ruddertail
- Promi Diplomacy ate my homework...
- Posts: 4510
- Joined: Wed May 12, 2004 11:39 pm
- Location: Chances are, playing FAF.
- Contact:
It was a scope problem. I'll get into specifics cause I'm bored.
if(do_magic) was moved into a function called do_magic. It declared a whole set of global variables so it could access the things it had when it was not its own function. And it did calculate wizloss correctly and such.
The problem was that it did not declare wizloss as a global variable, that is, when the fail function asked for global wizloss it was getting the global variable, which was seperate from the do_magic() only variable.
That's why hawk battles would lose wizards: the wizloss is different so the spell calculated it itself, and since it had global $wizloss, it worked.
I added $wizloss to the global list and I soon lost quite a few hawks to #72.
(Btw: #72, all those murders and such, no offense there just me trying to figure out the problem)
Please test in case it is not 100% functional.
-Veranor.
if(do_magic) was moved into a function called do_magic. It declared a whole set of global variables so it could access the things it had when it was not its own function. And it did calculate wizloss correctly and such.
The problem was that it did not declare wizloss as a global variable, that is, when the fail function asked for global wizloss it was getting the global variable, which was seperate from the do_magic() only variable.
That's why hawk battles would lose wizards: the wizloss is different so the spell calculated it itself, and since it had global $wizloss, it worked.
I added $wizloss to the global list and I soon lost quite a few hawks to #72.
(Btw: #72, all those murders and such, no offense there just me trying to figure out the problem)
Please test in case it is not 100% functional.
-Veranor.
"The truth is a trap: you can not get it without it getting you; you cannot get the truth by capturing it, only by its capturing you." - Søren Kierkegaard
-
Members connected in real time



