DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 28, 2016, 06:51:00 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Eth the Vamp "Division by zero" error  (Read 2543 times)
0 Members and 1 Guest are viewing this topic.
IndieRadioLive
Guest
« on: March 14, 2006, 03:33:34 PM »

 Embarrassed I searched for this, but didnt find anyting too spacific. I only know that this error happens on other modules as well.

Something Special!

You awaken alone in a dark, cold alley way. Your neck throbs, and your head is pounding. With a struggle, you slowly rise to your feet.


PHP Warning: "Division by zero"
in /home/irlradio/public_html/lotgd/modules/ethvampire.php at 118.
Call Stack:
2: ethvampire_runevent() called from /home/irlradio/public_html/lotgd/modules/ethvampire.php on line 118
3: ethvampire_runevent("village", "village.php?") called from /home/irlradio/public_html/lotgd/lib/modules.php on line 1090
4: module_do_event("village", "ethvampire", false, "village.php?") called from /home/irlradio/public_html/lotgd/lib/events.php on line 48
5: handle_event("village") called from /home/irlradio/public_html/lotgd/village.php on line 106

Somehow, you feel different. A great darkness has settled in your heart, and a greater air of indifference and malignancy pervades your mind.

Though you aren't fully aware of it at the moment, you have become a vampire!


This is line 118 in ethvampire.php
$vamp = max(round($session['user']['deathpower']/$favorratio),3);

Thank you Smiley
Logged
Nightborn
Guest
« Reply #1 on: March 14, 2006, 08:06:22 PM »

Line 117 would have been nice =)
Code:
$favorratio = get_module_setting("favorratio","racevamp");

There it is set. The variable seems to be 0, please check what you have entered in the vampire race settings in the manage modules section. if it's 0, then here is the error.
Logged
IndieRadioLive
Guest
« Reply #2 on: March 14, 2006, 09:12:19 PM »

hehe no fair, your brain is bigger than mine Tongue

Well, in my vampire race's module I have; % chance to be killed in mine, and the cost in Lodge points. The lodge points I had set at 0 (I changed to 5 now). I'll see if that works Smiley

I search my racevampire.php and didnt find anything about favors.

thank you  Grin

Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #3 on: March 14, 2006, 10:16:05 PM »

The module's name is "racevamp.php" not "racevampire.php". At least the "ethvampire"-module is looking for a file named "racevamp".

If you do not have this file installed, this values cannot be found and will always be "0".

(If you don't have the racevamp.php, you could change line 117 to
Code:
$favorratio = 1;
instead of the call for "get_module_setting()".
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #4 on: March 15, 2006, 01:56:57 AM »

here is XChrisX with the brain at the size of a planet =)

I didn't see this one.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #5 on: March 15, 2006, 06:44:52 AM »

So, a good thing to replace this with, would be:
Code:
$favorratio = 1;
if (is_module_active("racevamp")) $favorratio = get_module_setting("favorratio","racevamp");
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

IndieRadioLive
Guest
« Reply #6 on: March 15, 2006, 12:20:10 PM »

The module's name is "racevamp.php" not "racevampire.php". At least the "ethvampire"-module is looking for a file named "racevamp".

If you do not have this file installed, this values cannot be found and will always be "0".

(If you don't have the racevamp.php, you could change line 117 to
Code:
$favorratio = 1;
instead of the call for "get_module_setting()".

Ahhhh You are right, my typo.. it is racevamp. Thank you for the change in code. I think I will still replace it as my racevamp.php has no reference to favor or favorratio. You guys are awesome, I cant say ty enough hehe
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #7 on: March 15, 2006, 12:31:33 PM »

Maybe you have an outdated version of the file?! (Or two authors accidently created a race with the same name... :p )
Logged

Running for more than three years now:
SaucyWench
Mod God
*****
Offline Offline

Posts: 2238


I'm a good girl.


View Profile WWW
« Reply #8 on: March 15, 2006, 03:39:30 PM »

here is XChrisX with the brain at the size of a planet =)
Not possible... I've seen Chris's head! But, maybe it's more efficient than our brains...
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
Nightborn
Guest
« Reply #9 on: March 16, 2006, 05:03:44 AM »

[spam]
=) he makes full use of the fourth dimension. tranformed to 3 dimensions it would be a full scale planet with animals and plants and 1-2 higher lifeforms like humans =)

you can't see it's full size in just 3 dimension
[/spam]
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
34 Guests, 1 User
Stephen.Kise
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search