Jump to content

Search the Community

Showing results for tags 'nil'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 3 results

  1. Attempt to do arithmetic on a nil value. And the code is: --Here you have the tables playersT = {"VaporZ"} moneyT = {"100"} addCommandHandler("deposit", function(player, commandName, amount) --Here is our "nil" value (I often use "100" for "amount", when I have $12,000) for k, v in ipairs(playersT) do if(string.match(playersT[k], getPlayerName(player))) then if amount and (tonumber(amount) <= getPlayerMoney(player)) then local i = table.find(players, getPlayerName(player)) local am = tonumber(amount) --Setting "am" as "amount", but changed into number takePlayerMoney(
  2. O problema é que quando um dos valores é nil a mensagem não é enviada. function soma(thePlayer, commandName, um, dois) local num1 = tonumber(um) local num2 = tonumber(dois) local resultado = um + dois if commandName then if (num1 and num2) >= 0 then outputChatBox("A soma entre "..num1.. "e "..num2.." é igual a "..resultado..".", thePlayer, 255,255,255, true) elseif (num1 or num2) == nil then outputChatBox("Você precisa digitar os dois números para fazer a conta.", thePlayer) end end end addCommandHandler("somar", soma)
  3. The connection is okay but dbQuery and dbPoll first argument got nil. ( sorry for my bad english ) ERROR: MYSQL CONNECTION CODE: "felhasznalo" SCRIPT:
×
×
  • Create New...