Snoozy Posted June 2, 2011 Share Posted June 2, 2011 Hey I've come across a problem with 'for' limit must be a number and have been unable to find a fix, anyhow heres the code and so on where it comes from infoRoot = getElementByID("infoRoot") maxbi = getElementData(infoRoot,"MaxBusiness") for idx=1,maxbi do -- 'for' limit must be a number appears here triggerServerEvent ( "GetBizName", getLocalPlayer(),idx) end It have worked before which is why it just seems strange local infoRoot = createElement("infoRoot", "infoRoot") setElementData(infoRoot, "MaxBusiness",maxbi) This is where the data is set Link to comment
Snoozy Posted June 2, 2011 Author Share Posted June 2, 2011 Where? Just tried 2 different places but it didn't work? Link to comment
Snoozy Posted June 2, 2011 Author Share Posted June 2, 2011 Oh well I just found the problem when I was trying to explain when it happen Looking at the code I was about to put into this post I noticed the problem, it was that I created the infoRoot element twice, and it was after the MaxBusiness was defined so it got erased again lol Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now