Skip to content

Commit

Permalink
Fix by senue @ issue 89 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperak authored and Bart Ribbers committed Oct 20, 2019
1 parent 4ed328d commit fd9ebad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions towns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function TownCreate(Split, Player)
if (remote_town[1]) then --There is already a town close-by
Player:SendMessageFailure("You're too close to an existing town, please move further away before trying to create a new town.");
else -- Insert the town data in the database
local sql = "INSERT INTO towns (town_name, town_explosions_enabled, town_pvp_enabled, town_spawnX, town_spawnY, town_spawnZ, town_spawnWorld) VALUES (?, ?, ?, ?, ? ,?, ?)";
local parameters = {Split[3], 0, 0, math.floor(Player:GetPosX()), math.floor(Player:GetPosY()), math.floor(Player:GetPosZ()), Player:GetWorld():GetName()};
local sql = "INSERT INTO towns (town_name, town_spawnX, town_spawnY, town_spawnZ, town_spawnWorld) VALUES (?, ?, ?, ?, ?)";
local parameters = {Split[3], math.floor(Player:GetPosX()), math.floor(Player:GetPosY()), math.floor(Player:GetPosZ()), Player:GetWorld():GetName()};
local townId = ExecuteStatement(sql, parameters);

local sql = "INSERT INTO plots (town_id, chunkX, chunkZ, world) VALUES (?, ?, ?, ?)";
Expand Down

0 comments on commit fd9ebad

Please sign in to comment.