Jump to content

JoeBullet

Members
  • Posts

    7
  • Joined

  • Last visited

Details

  • Gang
    Destroyers

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JoeBullet's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. JoeBullet

    Scripteri

    evo i mene, nekako je pusto ovo
  2. JoeBullet

    Crash mta 1.1!

    I am sorry for refreshing the topic, but that happened to me recently too. The problem is that some programs supply their own psapi.dll library which could be out-dated, but Windows nevertheless uses them. To solve it, follow this fairly simple steps: 1. Go to Menu, then to Search 2. Find all files with name "psapi.dll" and rename all of them EXCEPT the one in "system32" folder. 3. Try to run the game again. If that doesn't help, try to run sfc /scannow in Command Prompt(you will need the Windows XP installation disc), or run the Windows Update, or find the "psapi.dll" with version 5.x.xxxx.xxxx or above. EDIT: Thanks to Towncivilian, the correct switch for 'sfc' is '/scannow'.
  3. If you want to get rid of people like these you could post an infected file here for analyse. I would be thrilled to reverse-hack him if the file packing is simple or nonexistant.
  4. meta.xml <meta> <info author="JoeBullet" type="gamemode" name="jMTARP" description="RP gamemode" /> <script src="language.lua" /> <script src="main.lua" /> </meta> main.lua function Callback_Join() outputChatBox(getTextByLang("Hrvatski", "PLAYER_JOIN")); outputChatBox(getTextByLang("English", "PLAYER_JOIN")); end addEventHandler("onPlayerJoin", getRootElement(), Callback_Join); language.lua function getTextByLang(language, alias) if type(language) ~= "string" then outputServerLog("getTextByLang's requires string"); language = tostring(language); end if type(alias) ~= "string" then outputServerLog("getTextByLang's requires string"); alias = tostring(alias); end local languages_node = xmlLoadFile("languages.xml"); -- load file, gets "languages" node if(languages_node) then for _, langNode in ipairs(xmlNodeGetChildren(languages_node)) do -- get "language" node local langName = xmlNodeGetAttribute(langNode, "name"); if(langName == language) then for _, text in ipairs(xmlNodeGetChildren(langNode)) do local xmlAlias = xmlNodeGetAttribute(text, "alias"); if(xmlAlias == alias) then return xmlNodeGetAttribute(text, "str"); end end end end xmlUnloadFile(languages_node); else outputServerLog('xmlLoadFile("languages.xml") failed'); end outputServerLog("FATAL ERROR: Alias " .. alias .. " not found for language " .. language); return "Please be patient, error is reported and will be solved as soon as possible. Thanks!"; end EDIT: Seems like problem self-repaired, I just started server and everything worked. Thanks for help (Please lock topic)
  5. I just tried that, fails too. Exact error(same as before): * attempt to call global 'function_name'(nil value) *
  6. Yeah, I tried that too, but doesn't work. It's says something like "global function is nil". I defined both files in meta.xml
  7. LUA offers some nice functions for including LUA file in LUA file( loadfile, dofile, require ). They simply don't work when tested in MTA environment. All three returns false or nil. Example: main.lua require "other" other.lua -- code Even putting module("other", package.seeall) in other.lua doesn't help, also require and dofile fails too. I searched forum and found that dofile() ISN'T SUPPORTED in LUA? I really need modular division between files because it helps organizing source, and also I used to it from C and C++. BtW. I read lua online book.
×
×
  • Create New...