Spliff Posted January 14, 2013 Share Posted January 14, 2013 Hey guys, so, I am working on a RP gamemode atm, which uses very few parts of the Valhalla script. (Elevator system and half of the item system) Anyways, I've been trying to get the elevator system to work, yet whenever I try it out ingame, it simply gives me the error: "There was an error while creating an elevator. Try again." I've posted the code giving trouble below, any suggestions? Note: The mysql db seems to be fine, yet the query does not get added. function createElevator(thePlayer, commandName, interior, dimension, ix, iy, iz) if (exports.global:isPlayerSuperAdmin(thePlayer)) or (exports.donators:hasPlayerPerk(thePlayer,14) and exports.global:isPlayerFullAdmin(thePlayer)) then if not (interior) or not (dimension) or not (ix) or not (iy) or not (iz) then outputChatBox("SYNTAX: /" .. commandName .. " [interior ID] [Dimension ID] [X] [Y] [Z]", thePlayer, 255, 194, 14) else local x, y, z = getElementPosition(thePlayer) interior = tonumber(interior) dimension = tonumber(dimension) local interiorwithin = getElementInterior(thePlayer) local dimensionwithin = getElementDimension(thePlayer) ix = tonumber(ix) iy = tonumber(iy) iz = tonumber(iz) id = SmallestElevatorID() if id then local query = mysql:query_free("INSERT INTO elevators SET id='" .. mysql:escape_string(id) .. "', x='" .. mysql:escape_string(x) .. "', y='" .. mysql:escape_string(y) .. "', z='" .. mysql:escape_string(z) .. "', tpx='" .. mysql:escape_string(ix) .. "', tpy='" .. mysql:escape_string(iy) .. "', tpz='" .. mysql:escape_string(iz) .. "', dimensionwithin='" .. mysql:escape_string(dimensionwithin) .. "', interiorwithin='" .. mysql:escape_string(interiorwithin) .. "', dimension='" .. mysql:escape_string(dimension) .. "', interior='" .. mysql:escape_string(interior) .. "'") if (query) then --reloadOneElevator(id, true) loadOneElevator(id) outputChatBox("Elevator created with ID #" .. id .. "!", thePlayer, 0, 255, 0) end else outputChatBox("There was an error while creating an elevator. Try again.", thePlayer, 255, 0, 0) end end end end addCommandHandler("addelevator", createElevator, false, false) Link to comment
Baseplate Posted January 14, 2013 Share Posted January 14, 2013 We don't give support to vG scripts. Link to comment
Spliff Posted January 14, 2013 Author Share Posted January 14, 2013 Samer, this is not the vG script, it's used in it, sure, but this Elevator script was made by Mabako, and given to me by Mabako. -Therefor, it is not a "vG script". Nonetheless, I fixed it myself. Link to comment
GhostXoP Posted January 14, 2013 Share Posted January 14, 2013 which uses very few parts of the Valhalla script A true man, takes great pride in his work. Of the couple thousand lines my game mode is (36 Klocs and growing, so its actually small at the moment but) I would hang anyone who stole even a piece of my scripts. Well. Yeah, Id find them, and hang them. Otherwise, be very choosy of your words on this forum. Steal any scripts and we will make sure your stay isn't pleasant. Link to comment
Spliff Posted January 14, 2013 Author Share Posted January 14, 2013 You guys are forgetting that Daniels, THE CREATOR OF THE vG SCRIPTS. Released these scripts, for everyone to use, I bought them of off him back in 2011. Link to comment
myonlake Posted January 14, 2013 Share Posted January 14, 2013 Samer, this is not the vG script, it's used in it, sure, but this Elevator script was made by Mabako, and given to me by Mabako.-Therefor, it is not a "vG script". Nonetheless, I fixed it myself. You are wrong. It is a Concrete Gaming (Valhalla Gaming, Root Gaming) code snippet. We do not give any support for stolen gamemodes or even its code snippets. If you want help, ask mabako. So stop lying to us. I have verified that this is a completely same code snippet from the gamemode. Link to comment
Recommended Posts