Jump to content

StefanAlmighty

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by StefanAlmighty

  1. How can I find my SDK user and pass? I'm not sure what is it.
  2. Yeah, fixed, thanks very much.
  3. [After running my server it gives an error in the console which seems to effect a few things in-game. WARNING: global\server_accounts.lua:24: getCharacterNameFromID(): Unable The function causing the issue: function getCharacterNameFromID(charID) if not charID then return false end local query = exports.mysql:query_fetch_assoc("SELECT `charactername` FROM characters WHERE `id`='"..exports.mysql:escape_string(charID).."' LIMIT 1") if query then local charName = tostring(query["charactername"]) exports.mysql:free_result(query) if charName then return charName end end outputDebugString("getCharacterNameFromID(): Unable",2) return false end It's exported in the mysql meta.xml so here's the code for the getCharacterNameFromID function query_rows_assoc(str) local queryresult = query(str) if not (queryresult == false) then local result = rows_assoc(queryresult) free_result(queryresult) return result end return false end
  4. That fixed it, thanks. Last thing, I'm getting a few issues where it says "access denied". I'm getting that from a few different resources. For example, I have an in-game command called "setpw" which sets the servers password. I type it and nothing happens, but on the console it says: WARNING: admin\admin_commands.lua:68: Access denied @ 'setServerPassword'
  5. The resource automatically starts in my mtaserver.config and the function is exported because it works perfectly in 1.4 (I double checked in MySQL/meta.xml too). I only get these issues because of the transition between 1.4 and 1.5. I just noticed another error in the console, so all three are: ERROR: mysql\connection.lua:235: attempt t9 call global 'mysql_ping' (a nil value) ERROR: doors\server_doors.lua:217: call: failed to call `MySQL:query` [string "?"] ERROR: npcs\server_npcs.lua:14: attempt to call global 'mysql_null' (a nil value)
  6. I don't get this error just in doors\server_doors.lua:217, I get it in like every single script which uses MySQL. I think there's an issue with MySQL connecting to all the resources but I'm not sure what it is.
  7. I just fixed the mysql_ping and I still get those errors. EDIT: The server does boot up and you can connect, but MySQL doesn't work at all which means I can't login because it can't fetch my account details from my DB.
  8. ERROR: MySQL\mysql_connect.lua:235: attempt to call global `MySQL_ping` (a nil value) ERROR: doors\server_doors.lua:217: call: failed to call `MySQL:query` [string "?"] ^ the console just repeats these exact errors but for different resources, such as "gangs-system". They worked fine on 1.4, but as soon as I converted to 1.5, I got these errors.
  9. I managed to fix that issue, however now, when I start up the server none of my MySQL is working. It just gives off a bunch of errors.
  10. Alright so I've done it, but when I boot up the server is says "error parsing config file" and then closes.
  11. Where can I get this installer? And yes, it's windows.
  12. One more thing, how do I update my server from MTA 1.4 to MTA 1.5?
  13. How can I do this in a client file?
  14. How would I go about checking if a row exists in my database in my script? And if it does exist, return true?
  15. Hey there, so when I try to start up my MTA 1.5 I get the following error: So far, I have tried the following, all of which have not helped my situation: Reinstalling MTA Reinstalling GTA San Andreas Googling for help, but the 'guide' said I should delete d3d9.dll from my GTA SA directory, but that file doesn't exist. Restarting my PC multiple times
  16. Alright so when somebody selects a vehicle on the list, chooses a player to spawn it to, chooses two colours and hits "spawn", it calls this function: function spawnButton(button) if button == "left" then local targetplayer = guiGetText(player) local targetcolour1 = guiGetText(colour1) local targetcolour2 = guiGetText(colour2) local vehiclemodel = guiGridListGetItemText(vehicleMenuCarsList,guiGridListGetSelectedItem(vehicleMenuCarsList),1) if targetplayer == "Player" or "" then targetplayer = thePlayer end if targetcolour1 == "Colour 1" or "" then targetcolour1 = 1 end if targetcolour2 == "Colour 2" or "" then targetcolour2 = 1 end if vehiclemodel == -1 then guiSetVisible(vehicleMenuWindow,false) showCursor(false) outputChatBox("You did not select a vehicle to spawn.",thePlayer) end local xs,ys,zs = getElementPosition(targetplayer) local vehicleid = createVehicle(vehiclemodel, xs, ys, zs) setVehicleColor(vehicleid, targetcolour1, targetcolour2, 0, 0) guiSetVisible(vehicleMenuWindow,false) showCursor(false) outputChatBox("You have spawned a vehicle.",targetplayer) end end I've tested the script with pre-set coordinates and it worked fine, but when the coordinates are xs, ys and zs the vehicle doesn't spawn. xs, ys and zs and set via the getElementPosition.
×
×
  • Create New...