BriGhtx3 Posted April 6, 2012 Posted April 6, 2012 Hey, I try to create an area on the map so I use createRadarArea. Now I have the positions X,Y,X2,Y2 in my MySQL table and want to create it: grX = math.abs(x-x2) grY = math.abs(y-y2) areaID[i] = createRadarArea ( x,y, grX, grY, 0, 0, 0, 0 ) This is how I calculate the sizeX and sizeY, but the area is created to the wrong side (x,y is right)...
drk Posted April 6, 2012 Posted April 6, 2012 Try not using math.abs. areaID[i] = createRadarArea ( x, y, x - x2, y - y2, 0, 0, 0, 0 )
Kenix Posted April 6, 2012 Posted April 6, 2012 Did you create request to mysql? Also use /debugscript 3
BriGhtx3 Posted April 6, 2012 Author Posted April 6, 2012 There were no errors, but I got it. x2-x y2-y and not x-x2 y-y2
BriGhtx3 Posted April 6, 2012 Author Posted April 6, 2012 I already got the right solution^^ Check my last post.
Jaysds1 Posted April 6, 2012 Posted April 6, 2012 If the positions are in MySQL then your going to need to get them using: dbConnect() dbPoll --and dbQuery after getting the results, use dbFree to disconnect from the MySQL.
Jaysds1 Posted April 6, 2012 Posted April 6, 2012 Second guy who post when he solved the problem LOL oh, srry
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