Jump to content

Need Help with 1 line


spoty

Recommended Posts

ive got this error code

attempt to perform arithmetic on a userdate value

the error is from this line

local total = 0 + getRootElement ( source, "Total Drift", true ) 

its for drft resource

i have maded a db to save the drift points but as you can see

local total = 0

let the points start counting from 0 and when i join its perfect but start to drift it just starts to recount from 0

so thats why i use the getRootElement

Link to comment

the error is from this line

local total = 0 + getRootElement ( source, "Total Drift", true ) 

It's not the right usage of getRootElement(), this function returns the root element (players, vehicles, peds, resources...etc) and also this function doesn't require any arguments.

often, you mean "getElementData" as denny199 said

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...