Jump to content

victormgons

Members
  • Posts

    26
  • Joined

  • Last visited

Recent Profile Visitors

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

victormgons's Achievements

Advanced Member

Advanced Member (8/54)

2

Reputation

  1. This is a part of an inventory, the names are tha categories and inside them will have items
  2. I'm using the table like this testTable = { ["Primary Weapon"] = {}, ["Secondary Weapon"] = {}, ["Pistols"] = {}, ["Specially Weapon"] = {}, ["Ammo"] = {}, ["Food"] = {}, ["Medic Stuff"] = {}, ["Vehicle Parts"] = {}, ["Items"] = {}, ["Toolbelt"] = {}, } for catName,category in pairs(testTable)do outputChatBox(catName) end And it needs to start on Primary Weapon and finish on Toolbelt, in order..
  3. But i'm using strings, i posted with numbers for a example
  4. I tried to use ipairs but it didn't show nothing
  5. Hi, i have this script that isn't working correctly. testTable = { ["1"] = {}, ["2"] = {}, ["3"] = {}, ["4"] = {}, ["5"] = {}, ["6"] = {}, ["7"] = {}, ["8"] = {}, ["9"] = {}, ["10"] = {}, } for catName,category in pairs(testTable)do outputChatBox(catName) end It doesn't show the numbers in order, it shows: 1 3 2 5 4 7 6 9 8 10. What's wrong? Is there a way to fix it? Thanks
  6. Thank you so much. It works perfectly!
  7. I forgot to change before post here... But it gives this error: Server.lua:3: bad argument #1 to 'pairs' (table expected, got boolean)
  8. Hello everyone, I'm trying do download a XML file from a server-side script and load it to get informations, I made this script but isn't working... Can anyone help me? function returnFunction(responseData,errno) file = xmlLoadFile(responseData) for i,node in pairs(xmlNodeGetChildren(file))do outputChatBox(xmlNodeGetName(node)) end end fetchRemote("http://www.w3schools.com/xml/note.xml",returnFunction)
  9. Hi, is there any way to increase the blend weather speed? I want to increase it but not using setMinuteDuration because it's change the time too, and I want to change just the blend speed... Is it possible? Thanks
  10. Hi, I want to check if one object is inside the colshape, but this isn't working: col = createColCuboid(349,2489,15.5,5,5,3) obj = createObject(1549,352,2492,17) if isElementWithinColShape(obj,col)then outputChatBox("OK",getRootElement()) end Can someone help me? Thanks
  11. I made all in server-side, thx for the help Solved!
  12. Hi. I need to generate an ID using this code: function generateIDForABase() xml = xmlLoadFile("SavedBases.xml") ID = 0 maxn = 0 number = 0 for i,node in pairs(xmlNodeGetChildren(xml)) do maxn = i end for i,node in pairs(xmlNodeGetChildren(xml)) do number = xmlNodeGetName(node):gsub('Base','') numbers = tonumber(number) ID = ID + 1 if numbers ~= i then break end end if ID == maxn and ID == tonumber(number) then ID = ID + 1 end return "Base"..ID end And the XML is <config> <Base1></Base1> <Base2></Base2> </config> It's working, but, when I delete the ID 1, and add it again, the XML will be: <config> <Base2></Base2> <Base1></Base1> </config> And the script says the ID 1 is not used, can anyone help me?
  13. When I use: for _,mark in pairs(getElementsByType("marker")) do in server-side it doesn't find the markers that I created in client-side, how can I fix it?
×
×
  • Create New...