twitch97 Posted May 11, 2012 Share Posted May 11, 2012 Everytime i go into my server the screen is black and i lose all my money and guns. This happened when i updated a resource to my host. I go the files back to the original ones and it didnt work. Heres my server og : Auto-restarting the server on crash (B )0 [?1049h [ r [m [4l [?1h = [39;49m [39;49m [37m [40m [1;1H[2;1H[3;1H[4;1H[5;1H[6;1H[7;1H[8;1H[9;1H[10;1H[11;1H[12;1H[13;1H[14;1H[15;1H[16;1H[17;1H[18;1H[19;1H[20;1H[21;1H[ H[ [24;1H [1@ [30m [42m [H [23B [1@ [H [m [39;49m [37m [40m [23B [1@ [H[07:43:15] ERROR: exports: Call to non-running server resource (anticheat-system [2;1H) [string "?"] [ [07:43:15] ERROR: exports: Call to non-running server resource (pool) [string "? [4;1H"] [ [07:43:15] ERROR: account-system/s_account_system_sapphire.lua:94: bad argument [ #1 to 'ipairs' (table expected, got nil) [ [07:43:15] start: Resource 'character-system' started [ [07:43:15] start: Resource 'carshop-cc' started [ [07:43:15] start: Resource 'carshop-g' started [ [07:43:15] start: Resource 'bikeshop' started [ [07:43:15] start: Resource 'boatshop' started [ [07:43:15] start: Resource 'carshop-low' started [ [07:43:15] start: Resource 'marquis-shop' started [ [07:43:15] WARNING: fuel-system/s_fuel_system.lua:90: Bad argument @ 'setTimer' [ [Expected number at argument 3, got function] [ [07:43:15] Please wait... [ [07:43:16] WARNING: killmessages/vgkillmessages_server.lua:80: Bad argument @ 'a [18;1HddEvent' [Expected bool at argument 2, got string 'wasted,killer,weapon'] [ [07:43:16] INFO: Lottery will be drawn in 317 minutes. [ [07:43:16] ERROR: realism-system/s_vehicle_crash.lua:11: attempt to call global [ 'getLocalPlayer' (a nil value) [ [07:43:17] Server started and is ready to accept connections! [ [07:43:17] Type 'help' for a list of commands. [ [30m [42m [1@ [m [39;49m [37m [40m [1@ [H [3M [23B [1@ [30m [42m M [m [39;49m [37m [40m my s_account_system.lua has no errors in it. Please someone help . Link to comment
TAPL Posted May 11, 2012 Share Posted May 11, 2012 ERROR: realism-system/s_vehicle_crash.lua:11: attempt to call global [ 'getLocalPlayer' (a nil value) you are using getLocalPlayer in server-side https://wiki.multitheftauto.com/wiki/GetLocalPlayer ------------------------------------------------------- my s_account_system.lua has no errors in it. Please someone help. ERROR: account-system/s_account_system_sapphire.lua:94: bad argument [ #1 to 'ipairs' (table expected, got nil) sure no error? Show the code or stop waste our time i saw a lot of topics like this and there no code to check and see where is the problem how we can help you if you didn't post the code?!!!! Link to comment
twitch97 Posted May 11, 2012 Author Share Posted May 11, 2012 ERROR: realism-system/s_vehicle_crash.lua:11: attempt to call global [ 'getLocalPlayer' (a nil value)you are using getLocalPlayer in server-side https://wiki.multitheftauto.com/wiki/GetLocalPlayer ------------------------------------------------------- my s_account_system.lua has no errors in it. Please someone help. ERROR: account-system/s_account_system_sapphire.lua:94: bad argument [ #1 to 'ipairs' (table expected, got nil) sure no error? heres the s_account_system_saphhire , and what do i do about the localplayer thing? heres half of it local mysql = exports.mysql local scriptVer = exports.global:getScriptVersion() local salt = "vgrpkeyscotland" anotherhairyAss = true -- Don't ask for email. -- Gay beta code local hasBeta = { } function UserAccountLoggedOut() exports['anticheat-system']:changeProtectedElementDataEx(client, "gameaccountloggedin", 0, true) end addEvent("account:loggedout", true) addEventHandler("account:loggedout", getRootElement(), UserAccountLoggedOut) function UserLoggedOut() exports['anticheat-system']:changeProtectedElementDataEx(source, "loggedin", 0, true) end addEvent("player:loggedout", true) addEventHandler("player:loggedout", getRootElement(), UserLoggedOut) function UserLoggedOutAll() exports['anticheat-system']:changeProtectedElementDataEx(client, "loggedin", 0, true) exports['anticheat-system']:changeProtectedElementDataEx(client, "gameaccountloggedin", 0, true) end addEvent("accountplayer:loggedout", true) addEventHandler("accountplayer:loggedout", getRootElement(), UserLoggedOutAll) function informServerHasBeta() hasBeta[client] = true end addEvent("hasBeta", true) addEventHandler("hasBeta", getRootElement(), informServerHasBeta) function beta(thePlayer) if ( exports.global:isPlayerAdmin(thePlayer)) then local count = 0 for k,v in pairs(hasBeta) do count = count + 1 end exports.global:sendMessageToAdmins("> " .. count .. " people are running Sapphire Beta.") end end addCommandHandler("beta", beta) function playerQuit() hasBeta[source] = nil end addEventHandler("onPlayerQuit", getRootElement(), playerQuit) function acceptBeta() --redirectPlayer(client, "vedicgaming.net", 22003, getServerPassword()) end addEvent("acceptBeta", true) addEventHandler("acceptBeta", getRootElement(), acceptBeta) -- end gay beta code function sendSalt() triggerClientEvent(client, "sendSalt", source, salt, getPlayerIP(source), getElementData(getRootElement(), "account:motd")) end addEvent("getSalt", true) addEventHandler("getSalt", getRootElement(), sendSalt) function encrypt(str) local hash = 0 for i = 1, string.len(str) do hash = hash + tonumber(string.byte(str, i, i)) end if (hash==0) then return 0 end hash = hash + 100000000 return hash end function encryptSerial(str) local hash = md5(str) local rhash = "VGRP" .. string.sub(hash, 17, 20) .. string.sub(hash, 1, 2) .. string.sub(hash, 25, 26) .. string.sub(hash, 21, 2) return rhash end function resourceStart(resource) setGameType("Roleplay") setMapName("Las Venturas") setRuleValue("Script Version", tostring(scriptVer)) setRuleValue("Author", "Daniels, Dev", "ThaCoinz, Matthew_Ello") local motdresult = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='motd' LIMIT 1") exports['anticheat-system']:changeProtectedElementDataEx(getRootElement(), "account:motd", motdresult["value" ], false ) --local amotdresult = mysql:query_fetch_assoc("SELECT value FROM settings WHERE name='amotd' LIMIT 1") --exports['anticheat-system']:changeProtectedElementDataEx(getRootElement(), "account:amotd", amotdresult["value" ], false ) for key, value in ipairs(exports.pool:getPoolElementsByType("player")) do triggerEvent("playerJoinResourceStart", value, resource) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStart) function onJoin() -- Set the user as not logged in, so they can't see chat or use commands exports['anticheat-system']:changeProtectedElementDataEx(source, "loggedin", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountloggedin", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountusername", "") exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountid", "") exports['anticheat-system']:changeProtectedElementDataEx(source, "dbid", false) exports['anticheat-system']:changeProtectedElementDataEx(source, "adminlevel", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "hiddenadmin", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "globalooc", 1, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "muted", 0) exports['anticheat-system']:changeProtectedElementDataEx(source, "loginattempts", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "timeinserver", 0, false) setElementDimension(source, 9999) setElementInterior(source, 0) clearChatBox(source) exports.global:updateNametagColor(source) end addEventHandler("onPlayerJoin", getRootElement(), onJoin) addEvent("playerJoinResourceStart", true) addEventHandler("playerJoinResourceStart", getRootElement(), onJoin) addEvent("restoreJob", false) function spawnCharacter(charname, version) exports.global:takeAllWeapons(client) exports.global:takeAllWeapons(source) takeAllWeapons(source) takeAllWeapons(client) source = client local id = getElementData(client, "gameaccountid") charname = string.gsub(tostring(charname), " ", "_") local safecharname = mysql:escape_string(charname) local data = mysql:query_fetch_assoc("SELECT * FROM characters WHERE charactername='" .. safecharname .. "' AND account='" .. mysql:escape_string(id) .. "' AND cked = 0") if (data) then local id = tonumber(data["id"]) local currentid = getElementData(source, "dbid") if hasBeta[source] then if id == currentid then return elseif currentid then triggerEvent("savePlayer", source, "Change Character", source) end end -- exports['anticheat-system']:changeProtectedElementDataEx(source, "atm_view", 0, true) -- for key, value in ipairs(getElementsByType("player")) do if ( getElementData(value, "loggedin") == 1 and value ~= source and hasBeta[value] ) then triggerClientEvent(value, "onPlayerCharacterChange", source, charname) end end local x = tonumber(data["x"]) local y = tonumber(data["y"]) local z = tonumber(data["z"]) local rot = tonumber(data["rotation"]) local interior = tonumber(data["interior_id"]) local dimension = tonumber(data["dimension_id"]) local health = tonumber(data["health"]) local armor = tonumber(data["armor"]) local skin = tonumber(data["skin"]) setPedSkin(source, skin) local money = tonumber(data["money"]) local factionID = tonumber(data["faction_id"]) local cuffed = tonumber(data["cuffed"]) local radiochannel = tonumber(data["radiochannel"]) local masked = tonumber(data["masked"]) local duty = tonumber(data["duty"]) local cellnumber = tonumber(data["cellnumber"]) local fightstyle = tonumber(data["fightstyle"]) local pdjail = tonumber(data["pdjail"]) local pdjail_time = tonumber(data["pdjail_time"]) local pdjail_station = tonumber(data["pdjail_station"]) local job = tonumber(data["job"]) local casualskin = tonumber(data["casualskin"]) local weapons = tostring(data["weapons"]) local ammo = tostring(data["ammo"]) local carlicense = tonumber(data["car_license"]) local gunlicense = tonumber(data["gun_license"]) local bankmoney = tonumber(data["bankmoney"]) local fingerprint = tostring(data["fingerprint"]) local tag = tonumber(data["tag"]) local hoursplayed = tonumber(data["hoursplayed"]) local timeinserver = tonumber(data["timeinserver"]) local restrainedobj = tonumber(data["restrainedobj"]) local restrainedby = tonumber(data["restrainedby"]) local factionrank = tonumber(data["faction_rank"]) local dutyskin = tonumber(data["dutyskin"]) local phoneoff = tonumber(data["phoneoff"]) local blindfold = tonumber(data["blindfold"]) local gender = tonumber(data["gender"]) local cellphonesecret = tonumber(data["cellphonesecret"]) local photos = tonumber(data["photos"]) local age = data["age"] local race = tonumber(data["skincolor"]) local weight = data["weight"] local height = data["height"] local desc = data["description"] local maxvehicles = tonumber(data["maxvehicles"]) local factionleader = tonumber(data["faction_leader"]) local d_addiction = tostring(data["d_addiction"]) exports['anticheat-system']:changeProtectedElementDataEx(source, "chardescription", desc) exports['anticheat-system']:changeProtectedElementDataEx(source, "age", age) exports['anticheat-system']:changeProtectedElementDataEx(source, "weight", weight) exports['anticheat-system']:changeProtectedElementDataEx(source, "height", height) exports['anticheat-system']:changeProtectedElementDataEx(source, "race", race) exports['anticheat-system']:changeProtectedElementDataEx(source, "maxvehicles", maxvehicles) -- LANGUAGES local lang1 = tonumber(data["lang1"]) local lang1skill = tonumber(data["lang1skill"]) local lang2 = tonumber(data["lang2"]) local lang2skill = tonumber(data["lang2skill"]) local lang3 = tonumber(data["lang3"]) local lang3skill = tonumber(data["lang3skill"]) local currentLanguage = tonumber(data["currlang"]) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.current", currentLanguage, false) if lang1 == 0 then lang1skill = 0 end if lang2 == 0 then lang2skill = 0 end if lang3 == 0 then lang3skill = 0 end exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang1", lang1, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang1skill", lang1skill, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang2", lang2, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang2skill", lang2skill, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang3", lang3, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "languages.lang3skill", lang3skill, false) -- END OF LANGUAGES exports['anticheat-system']:changeProtectedElementDataEx(source, "timeinserver", timeinserver, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "dbid", tonumber(id)) Link to comment
twitch97 Posted May 11, 2012 Author Share Posted May 11, 2012 heres the other half. It would let me post the full thing. sorry. : if not (found) then triggerClientEvent("hideLoginScrn", source) local admin = tonumber(data["admin"]) local hiddenadmin = tonumber(data["hiddenadmin"]) local adminduty = tonumber(data["adminduty"]) local donator = tonumber(data["donator"]) local adminjail = tonumber(data["adminjail"]) local adminjail_time = tonumber(data["adminjail_time"]) local adminjail_by = tostring(data["adminjail_by"]) local adminjail_reason = data["adminjail_reason"] local banned = tonumber(data["banned"]) local banned_by = data["banned_by"] local banned_reason = data["banned_reason"] local muted = tonumber(data["muted"]) local donatorchat = tonumber(data["donatorchat"]) local globalooc = tonumber(data["globalooc"]) local blur = tonumber(data["blur"]) local adminreports = tonumber(data["adminreports"]) local pmblocked = tonumber(data["pmblocked"]) local adblocked = tonumber(data["adblocked"]) local newsblocked = tonumber(data["newsblocked"]) local warns = tonumber(data["warns"]) local chatbubbles = tonumber(data["chatbubbles"]) local appstate = tonumber(data["appstate"]) local liveusername = data["liveusername"] local steamusername = data["steamusername"] if ( admin <= 0 and hasBeta[client] and not exports.global:isPlayerScripter( username ) and donator <= 0 ) then -- non admin with beta? ban exports.global:sendMessageToAdmins("[AdmWarn] " .. getPlayerName(client) .. " was banned for running a hacked Sapphire Beta.") local ban = banPlayer(client, true, false, false, getRootElement(), "Hacked Beta.", 0) mysql:query_free("UPDATE accounts SET banned='1', banned_reason='Hacked Beta.', banned_by='Script' WHERE id='" .. mysql:escape_string(id) .. "'") end local country = tostring(exports.global:getPlayerCountry(source)) if username == "Daniels" then country = "SC" end exports['anticheat-system']:changeProtectedElementDataEx(source, "country", country) if tonumber(admin) == 0 then adminduty = 0 hiddenadmin = 0 end if ( liveusername ~= mysql_null() and hasBeta[source] ) then callRemote("http://valhallagaming.net/mtaucp/mta/lookup_live.php", xboxReturnExisting, tostring(liveusername), source) end if ( steamusername ~= mysql_null() and hasBeta[source] ) then callRemote("http://valhallagaming.net/mtaucp/mta/lookup_steam.php", steamReturnExisting, tostring(steamusername), source) end if donator > 0 then -- check if they're a donator exports['anticheat-system']:changeProtectedElementDataEx(source, "pmblocked", pmblocked, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "tognews", newsblocked, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "disableAds", adblocked == 1, false) else -- no donator, set default things exports['anticheat-system']:changeProtectedElementDataEx(source, "pmblocked", 0, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "disableAds", false, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "tognews", 0, false) end exports['anticheat-system']:changeProtectedElementDataEx(source, "donatorlevel", tonumber(donator)) exports['anticheat-system']:changeProtectedElementDataEx(source, "adminlevel", tonumber(admin)) exports['anticheat-system']:changeProtectedElementDataEx(source, "hiddenadmin", tonumber(hiddenadmin)) exports['anticheat-system']:changeProtectedElementDataEx(source, "donator", tonumber(donator)) exports['anticheat-system']:changeProtectedElementDataEx(source, "blur", blur) setPlayerBlurLevel(source, blur == 0 and 0 or 38) if (appstate==0) then clearChatBox(source) --outputChatBox("You must submit an application at [url=http://www.valhallagaming.net/mtaucp]www.valhallagaming.net/mtaucp[/url] in order to get your account activated.", source, 255, 194, 15) kickPlayer(source, getRootElement(), "Submit an application at [url=http://www.vedicgaming.net/ucp]www.vedicgaming.net/ucp[/url]") elseif (appstate==1) then clearChatBox(source) --outputChatBox("Your application is still pending, visit [url=http://www.vedicgaming.net/ucp]www.vedicgaming.net/ucp[/url] to review its status.", source, 255, 194, 15) kickPlayer(source, getRootElement(), "Application Pending, Review Status at [url=http://www.vedicgaming.net/ucp]www.vedicgaming.net/ucp[/url]") elseif (appstate==2) then clearChatBox(source) --outputChatBox("Your application was declined, You can read why, and resubmit a fixed one at [url=http://www.vedicgaming.net/ucp]www.vedicgaming.net/ucp[/url]", source, 255, 194, 15) kickPlayer(source, getRootElement(), "Re-Submit an application at [url=http://www.vedicgaming.net/ucp]www.vedicgaming.net/ucp[/url]") elseif (banned==1) then triggerClientEvent(source, "loginFail", source, 3) else exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountloggedin", 1, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountusername", username) exports['anticheat-system']:changeProtectedElementDataEx(source, "gameaccountid", tonumber(id)) exports['anticheat-system']:changeProtectedElementDataEx(source, "adminduty", tonumber(adminduty)) exports['anticheat-system']:changeProtectedElementDataEx(source, "adminjailed", adminjail == 1, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "jailtime", tonumber(adminjail_time), false) exports['anticheat-system']:changeProtectedElementDataEx(source, "jailadmin", tostring(adminjail_by), false) exports['anticheat-system']:changeProtectedElementDataEx(source, "jailreason", tostring(adminjail_reason), false) exports['anticheat-system']:changeProtectedElementDataEx(source, "globalooc", tonumber(globalooc), false) exports['anticheat-system']:changeProtectedElementDataEx(source, "donatorchat", tonumber(donatorchat), false) exports['anticheat-system']:changeProtectedElementDataEx(source, "muted", tonumber(muted)) exports['anticheat-system']:changeProtectedElementDataEx(source, "adminreports", adminreports, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "warns", warns, false) exports['anticheat-system']:changeProtectedElementDataEx(source, "chatbubbles", chatbubbles, false) if ( hasBeta[source] ) then triggerClientEvent(source, "loginOK", source) else -- backwards compatability triggerClientEvent(source, "hideUI", source) local playerid = getElementData(source, "playerid") spawnPlayer(source, 258.43417358398, -41.489139556885, 1002.0234375, 268.19247436523, 0, 14, 65000+playerid) fadeCamera(source, true) end sendAccounts(source, id) --setTimer(sendAccounts, 15000, 1, source, id) -- Get login time & date local time = getRealTime() local days = time.monthday local months = (time.month+1) local years = (1900+time.year) local yearday = time.yearday local logindate = days .. "/" .. months .. "/" .. years local ip = getPlayerIP(source) mysql:query("UPDATE accounts SET lastlogin=NOW(), ip='" .. mysql:escape_string(ip) .. "', country='" .. mysql:escape_string(country) .. "', mtaserial='" .. mysql:escape_string(getPlayerSerial(source)) .. "' WHERE id='" .. mysql:escape_string(id) .. "'") end else triggerClientEvent(source, "loginFail", source, 2) end else triggerClientEvent(source, "failedLogin", source) playSoundFrontEnd( source, 20) local attempts = tonumber(getElementData(source, "loginattempts")) attempts = attempts + 1 exports['anticheat-system']:changeProtectedElementDataEx(source, "loginattempts", attempts, false) if (attempts>=3) then kickPlayer(source, true, false, false, getRootElement(), "Too many login attempts") else triggerClientEvent(source, "loginFail", source, loginErrorCode) end end if (result) then mysql:free_result(result) end end addEvent("onPlayerLogin", false) addEvent("attemptLogin", true) addEventHandler("attemptLogin", getRootElement(), loginPlayer) pendingResult = { } function displayRetrieveDetailsResult(result, player) if (player) and (pendingResult[player] ~= nil) then pendingResult[player] = nil if ( result == 0 ) then outputChatBox("Information on how to retrieve your username and password has been sent to your email address.", player, 0, 255, 0) else outputChatBox("This service is currently unavailable.", player, 255, 0, 0) end end end function checkTimeout(player) if ( pendingResult[player] ) then pendingResult[player] = nil outputChatBox("[TIMEOUT] This service is currently unavailable.", player, 255, 0, 0) end end function retrieveDetails(email) local safeEmail = mysql:escape_string(tostring(email)) local result = mysql:query("SELECT id FROM accounts WHERE email='" .. safeEmail .. "'") if (mysql:num_rows(result)>0) then local row = mysql:fetch_assoc(result) local id = tonumber(row["id"]) callRemote("http://www.valhallagaming.net/mtaucp/sendfpmail.php", displayRetrieveDetailsResult, id) outputChatBox("Contacting account server... Please wait...", source, 255, 194, 15) pendingResult[source] = true setTimer(checkTimeout, 10000, 1, source) else outputChatBox("Invalid Email.", source, 255, 0, 0) end mysql:free_result(result) end addEvent("retrieveDetails", true) addEventHandler("retrieveDetails", getRootElement(), retrieveDetails) function sendAccounts(thePlayer, id, isChangeChar) exports['anticheat-system']:changeProtectedElementDataEx(thePlayer,"loggedin",0) exports.global:updateNametagColor(thePlayer) exports.global:takeAllWeapons(thePlayer) local accounts = { } local result = mysql:query("SELECT id, charactername, cked, lastarea, age, gender, faction_id, faction_rank, skin, DATEDIFF(NOW(), lastlogin) as llastlogin FROM characters WHERE account='" .. mysql:escape_string(id) .. "' ORDER BY cked ASC, lastlogin DESC") if (mysql:num_rows(result)>0) then if (isChangeChar) then triggerEvent("savePlayer", source, "Change Character", source) end local i = 1 while true do local row = mysql:fetch_assoc(result) if not row then break end accounts[i] = { } accounts[i][1] = tonumber(row["id"]) accounts[i][2] = row["charactername"] if (tonumber(row["cked"]) or 0) > 0 then accounts[i][3] = 1 end accounts[i][4] = row["lastarea"] accounts[i][5] = tonumber(row["age"]) accounts[i][6] = tonumber(row["gender"]) local factionID = tonumber(row["faction_id"]) local factionRank = tonumber(row["faction_rank"]) if (factionID<1) or not (factionID) then accounts[i][7] = nil accounts[i][8] = nil else factionResult = mysql:query_fetch_assoc("SELECT name, rank_" .. mysql:escape_string(factionRank) .. " as rankname FROM factions WHERE id='" .. mysql:escape_string(tonumber(factionID)) .. "'") if (factionResult) then accounts[i][7] = factionResult["name"] accounts[i][8] = factionResult["rankname"] if (string.len(accounts[i][7])>53) then accounts[i][7] = string.sub(accounts[i][7], 1, 32) .. "..." end else accounts[i][7] = nil accounts[i][8] = nil end end accounts[i][9] = tonumber(row["skin"]) accounts[i][10] = tonumber(row["llastlogin"]) i = i + 1 end end if (result) then Link to comment
TAPL Posted May 11, 2012 Share Posted May 11, 2012 for key, value in ipairs(exports.pool:getPoolElementsByType("player")) do triggerEvent("playerJoinResourceStart", value, resource) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStart) your problem is 'pool' resource doesn't return the table why? look at the log file ERROR: exports: Call to non-running server resource (pool) [string "?"] Problem: pool resource is not running Link to comment
twitch97 Posted May 11, 2012 Author Share Posted May 11, 2012 for key, value in ipairs(exports.pool:getPoolElementsByType("player")) do triggerEvent("playerJoinResourceStart", value, resource) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStart) your problem is 'pool' resource doesn't return the table why? look at the log file ERROR: exports: Call to non-running server resource (pool) [string "?"] Problem: pool resource is not running ohk , how do i fix it? ohk Link to comment
TAPL Posted May 11, 2012 Share Posted May 11, 2012 for key, value in ipairs(exports.pool:getPoolElementsByType("player")) do triggerEvent("playerJoinResourceStart", value, resource) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStart) your problem is 'pool' resource doesn't return the table why? look at the log file ERROR: exports: Call to non-running server resource (pool) [string "?"] Problem: pool resource is not running ohk , how do i fix it? ohk huh? you need to kill yourself Link to comment
TAPL Posted May 11, 2012 Share Posted May 11, 2012 ??? How do i fix it. resource need other resource to can run without problem and the resource that needed aren't running What should you do in this situation? Kills YourSelf for example? Link to comment
Chamberlien Posted May 11, 2012 Share Posted May 11, 2012 No the resource pool after your account system does you can fix it in the mtasercer.conf Link to comment
twitch97 Posted May 11, 2012 Author Share Posted May 11, 2012 No the resource pool after your account system does you can fix it in the mtasercer.conf How ? Link to comment
twitch97 Posted May 11, 2012 Author Share Posted May 11, 2012 ERROR: realism-system/s_vehicle_crash.lua:11: attempt to call global [ 'getLocalPlayer' (a nil value)you are using getLocalPlayer in server-side https://wiki.multitheftauto.com/wiki/GetLocalPlayer ------------------------------------------------------- my s_account_system.lua has no errors in it. Please someone help. And how do i fix that local player error? Link to comment
twitch97 Posted May 11, 2012 Author Share Posted May 11, 2012 change the player argument How do i do that? Link to comment
TAPL Posted May 12, 2012 Share Posted May 12, 2012 twitch97@ WTF is your fucking problem whenever tell you to do a thing, you say How? omg i tell you that pool resource is not running and you said ohk , how do i fix it?ohk omg are you stupid or idiot or both or what?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Link to comment
Castillo Posted May 12, 2012 Share Posted May 12, 2012 @TAPL: Please calm down, I know that is annoying that a lot of people asks the same question over and over, but you can just don't answer. Link to comment
ben_wright Posted May 12, 2012 Share Posted May 12, 2012 Go to the file and change it to thePlayer instead of getLocalPlayer() or localPlayer then save. Link to comment
twitch97 Posted May 12, 2012 Author Share Posted May 12, 2012 Ok thanks i will try that. Link to comment
twitch97 Posted May 12, 2012 Author Share Posted May 12, 2012 Go to the file and change it to thePlayer instead of getLocalPlayer() or localPlayer then save. i cant fking win. uto-restarting the server on crash (B )0 [?1049h [ r [m [4l [?1h = [39;49m [39;49m [37m [40m [1;1H[2;1H[3;1H[4;1H[5;1H[6;1H[7;1H[8;1H[9;1H[10;1H[11;1H[12;1H[13;1H[14;1H[15;1H[16;1H[17;1H[18;1H[19;1H[20;1H[21;1H[ H[ [24;1H [1@ [30m [42m [H [23B [1@ [H [m [39;49m [37m [40m [23B [1@ [H[13:12:56] ERROR: exports: Call to non-running server resource (pool) [string "? [2;1H"] [ [13:12:56] ERROR: account-system/s_account_system_sapphire.lua:94: bad argument [ #1 to 'ipairs' (table expected, got nil) [ [13:12:56] start: Resource 'character-system' started [ [13:12:56] start: Resource 'carshop-cc' started [ [13:12:56] start: Resource 'carshop-g' started [ [13:12:56] start: Resource 'bikeshop' started [ [13:12:56] start: Resource 'boatshop' started [ [13:12:56] start: Resource 'carshop-low' started [ [13:12:56] start: Resource 'marquis-shop' started [ [13:12:57] WARNING: fuel-system/s_fuel_system.lua:90: Bad argument @ 'setTimer' [ [Expected number at argument 3, got function] [ [13:12:57] Please wait... [ [13:12:57] WARNING: killmessages/vgkillmessages_server.lua:80: Bad argument @ 'a [16;1HddEvent' [Expected bool at argument 2, got string 'wasted,killer,weapon'] [ [13:12:57] INFO: Lottery will be drawn in 1428 minutes. [ [13:12:58] ERROR: realism-system/s_vehicle_crash.lua:11: attempt to call global [ 'LocalPlayer' (a nil value) [ [13:12:58] ERROR: vehicle-interiors/s_vehicle_interiors.lua:35: attempt to perfo [21;1Hrm arithmetic on a boolean value [ [13:12:58] Server started and is ready to accept connections! [ [13:12:58] Type 'help' for a list of commands. [ [30m [42m [1@ [m [39;49m [37m [40m [1@ [H [3M [23B [1@ [30m [42m M [m [39;49m [37m [40m[ H[21;1H[13:12:58] --------------------------------------------- [ [13:12:58] Viscaria Character System By: Dev, version: 1.1, Started. [ [13:12:58] --------------------------------------------- [ [30m [42m [1@ [m [39;49m [37m [40m [1@ [H [3M [23B [1@ [30m [42m M [m [39;49m [37m [40m[ H[21;1H[13:12:59] Stopping global [ [13:12:59] Starting global [ [13:12:59] global restarted successfully [ [30m [42m [1@ [m [39;49m [37m [40m [1@ [H [2M [23B [1@ [30m [42m M [m [39;49m [37m [40m[ H[13:13:13] CONNECT: jake connected (IP: 121.216.235.64 Serial: 95A17DC75C53D B [ C2D2FB7A541DD494 Version: 1.3.0-9.03916.0) [ [30m [42m [1@ [m [39;49m [37m [40m [1@ [1@ [30m [42m M [m [39;49m [37m [40m[13:13:15] JOIN: jake joined the game (IP: 121.216.235.64) [ [30m [42m [1@ [m [39;49m [37m [40m [1@ [H [3M [23B [1@ [30m [42m M [m [39;49m [37m [40m[ H[21;1H[13:13:47] NICK: jake is now known as Dwayne_Dean [ [13:13:47] ERROR: character-system/s_charactersystem.lua:489: attempt to concate [ nate local 'motd' (a boolean value) [ [30m [42m [1@ [m [39;49m [37m [40m i changed the thing and now i have more errors and shit. I tried to start 'pool' but it says its already running. Friggen hell. Link to comment
Chamberlien Posted May 12, 2012 Share Posted May 12, 2012 One thing to say Just don't use Valhalla/Vedic Gaming Scripts learn to Script yourself or use mta-paradise and build on it geeze. Link to comment
twitch97 Posted May 12, 2012 Author Share Posted May 12, 2012 Its not my fault this script has bugs and sh!t. Link to comment
Chamberlien Posted May 12, 2012 Share Posted May 12, 2012 So you're not allowd to use them anyway they are stolen you should make your own roleplay gamemode. Link to comment
twitch97 Posted May 12, 2012 Author Share Posted May 12, 2012 Everyone uses them. Nearly bout every rp server i see has valhalla scripts. Link to comment
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