[API] Calling player.createArea() with existing area id

  • I'll answer my own question : Yes, it will create areas of the same id every time, and will not replace a previous area of the same id.



    i think it users AUTO_INCREMENT for the id so id 1 would be area id 1 area 2 would be area id 2 and so on to remove the area you need to be inside it so then it would only remove the right id of that area you are inside

    76561198018554331.png


    :thumbsup: Rising Citys @ ip 74.118.138.151:4265 ServerName (Yahgiggles Rising Citys) :thumbsup:


    If at first your code does not work call it version 0.1 with the odd bug :S

  • that got me thinking what happens when you have two areas of the same name and use /cleanuparea area this time we are not in the area to know the id of the area we want to clean up lol

    76561198018554331.png


    :thumbsup: Rising Citys @ ip 74.118.138.151:4265 ServerName (Yahgiggles Rising Citys) :thumbsup:


    If at first your code does not work call it version 0.1 with the odd bug :S

  • i think it users AUTO_INCREMENT for the id so id 1 would be area id 1 area 2 would be area id 2 and so on to remove the area you need to be inside it so then it would only remove the right id of that area you are inside


    You are mistaking MySQL id (a PRIMARY KEY AUTO_INCREMENT) with an area id, which is defined when calling player:createArea. I am talking about the latter.

  • You are mistaking MySQL id (a PRIMARY KEY AUTO_INCREMENT) with an area id, which is defined when calling player:createArea. I am talking about the latter.




    my mistake was thinking the name area was just a name of a area you used as a example name of a area you protected using the protection script and was only a guess of how the id would work in the DB for that area, i know some php but very little java and lua and to be frank it bores the hell out of me lol

    76561198018554331.png


    :thumbsup: Rising Citys @ ip 74.118.138.151:4265 ServerName (Yahgiggles Rising Citys) :thumbsup:


    If at first your code does not work call it version 0.1 with the odd bug :S

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!