Bug Report - Resistances.

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Distro Developer
Posts: 2781
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas

Bug Report - Resistances.

Post by Yukiko » Sun Jul 08, 2018 1:47 am

A negative resistance causes POL to shut down. Yes. According to OSI things can have a negative resistance. Case in point dragon scales. See this page for details on dragon scales. This itemdesc.cfg entry:

Code: Select all

Item 0x26200
	Name			redscale
	Desc			red scale%s%
	Graphic			0x26B4
	Color			0x66D
	Weight			2
	MethodScript	scales/methods
	VendorBuysFor	2
	VendorSellsFor	4
    IName			red scale

	// Resistances
	PhysicalResist	1
	FireResist		11
	ColdResist		-3
	PoisonResist	1
	EnergyResist	1

	Movable			1
causes POL to issue this error:

Code: Select all

Error loading itemdesc.cfg Elemental Resistances for :scales:redscale (0x26200) : Error reading die string '-3': Expect
d digit at beginning, got '-'
Server Shutdown: load_itemdesc
Initiating POL Cleanup....

Grandmaster Poster
Posts: 247
Joined: Mon Feb 06, 2006 6:12 am

Re: Bug Report - Resistances.

Post by DevGIB » Sun Jul 08, 2018 9:43 pm

Would it be as simple as changing the following line:
https://github.com/polserver/polserver/ ... .cpp#L142


Code: Select all

      if ( !isdigit( *str ))

Code: Select all

      if ( !isdigit( *str ) || *str != '-' )

Post Reply