Author Topic: Battle  (Read 6073 times)

Gohan

  • Guest
Battle
« on: September 22, 2008, 04:08:55 am »
It's back again! but this time in battle.php. Here's the error just incase you've forgotten. ^^

Code: [Select]
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 209

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of rolldamage(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 229

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 241

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 279

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of rolldamage(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 285

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 310

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of rolldamage(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 316

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 327

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\lotgd-1.2.0-nightborn\lotgd-1.2.0-nightborn\battle.php on line 605

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Battle
« Reply #1 on: September 22, 2008, 07:29:27 am »
fixed.

if I fix it by removing the references - then the fighting won't work. I rely on them because I don't want to copy objects.

Leave it for now, turn off your php warnings.

I will rework the battle in 1.2.1 either way.
« Last Edit: September 22, 2008, 07:35:13 am by Nightborn »
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Gohan

  • Guest
Re: Battle
« Reply #2 on: September 22, 2008, 08:35:51 am »
Ok I'll leave it.

Added: AHHHH! I forgot where to turn off the php warnings, and my brain is to fried to remember, can anyone remind me?
« Last Edit: September 22, 2008, 08:48:16 am by Gohan »

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Battle
« Reply #3 on: September 22, 2008, 09:11:03 am »
search your files for E_WARNING

or in your php.ini

in lotgd
lib/errorhandler.php:10:      if ($errno & (E_USER_WARNING | E_WARNING)){
lib/errorhandler.php:26:   case E_WARNING:

however, this does not really work sometimes.

the "deprecated" message is unknown to me and my MySQL version, which one do you use btw.

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Gohan

  • Guest
Re: Battle
« Reply #4 on: September 22, 2008, 09:21:16 am »
I happen to be using
php 5.2.6
MySQL 5.0.51b
Hope that helps

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Battle
« Reply #5 on: September 22, 2008, 09:54:34 am »
Server version      5.0.32-Debian_7etch6-log
PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:35:46)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator


Hm, we are not that far apart (and I meant PHP Version, silly me).

Alright then, I will dump the battle system sooner or later - 1.2.0 is only an "in between" release for me though.
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Gohan

  • Guest
Re: Battle
« Reply #6 on: September 22, 2008, 09:58:03 am »
Ok, and I could get the errors to stop, so I'll just live it for now, I can live with errors taking up half the screen ^^
Better that than 1.1.1 *Shudders*

Nightborn

  • Administrator
  • Sr. Member
  • *****
  • Posts: 320
  • Karma: +20/-0
    • View Profile
    • Shinobilegends
Re: Battle
« Reply #7 on: September 22, 2008, 11:50:24 am »
^^ the errors should stop. I've had none, so just disable the warnings for the site.

"Deprecated" .. well, I used what it can offer, and my code got faster -> I passed a reference and modified the value in the function and did not need to return anything really. Handy thing.

Well, I'll do a possible HUGE battle object (shudder) copied from all the battle parts needed, so you do a $battle->rolldamage() and the battle takes the entire $badguy array with the objects. It should be planned better, but as I won't change any functionality you need on the outside, I can do an in-between solution and divide it later on to a better extent.

My goal is to make the battles more independent of the user, having $user->rolldamage() and so on.

As said, the "caches don't invalidate after an invalidatedatacache() call" is also something I need to work on.
Possibly a tiny thing, but it *should* already work... very strange. Maybe even a race condition. :(
It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro

Gohan

  • Guest
Re: Battle
« Reply #8 on: September 22, 2008, 11:53:22 am »
*nods pretending to understand*
jks I got some of it