Jump to content

[HELP] attempt to perform arithmetic on a nil value


99isme

Recommended Posts

function getHourlyRentalCost(vehicle)
	local payment
	local _vehicle
	
	if isElement(vehicle) then
		_vehicle = getElementModel(vehicle)
	else
		_vehicle = vehicle
	end
	
	payment = math.floor(exports.vehicles:getVehicleCost(_vehicle) / 333) or 0
	if (payment > MAX_HR_PAYMENT) then payment = MAX_HR_PAYMENT end
	
	return payment
end

 

attempt to perform arithmetic on a nil value

Edited by 99isme
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...