Jump to content

Problem with table.


Rat32

Recommended Posts

function rejestrujemy(username, password) 
  
litery = {"a", "b", "c"} 
  
local istnienieLoad = exports.DB2:pobierzWyniki("SELECT * FROM ACCS WHERE acc=?", username) 
if istnienieLoad == nil then 
for i=1, #username do 
local toprint = username:sub(i, i) 
if toprint == [litery] then 
outputChatBox(toprint) 
else 
(...) 

This is my code. Why "if" don't read the table?

Link to comment
  • 2 weeks later...

Don't know if you still need help with it,

But here you go:

  
function rejestrujemy(username, password) 
  
 litery = {"a", "b", "c"} 
  
local istnienieLoad = exports.DB2:pobierzWyniki("SELECT * FROM ACCS WHERE acc=?", username) 
if istnienieLoad == nil then 
    for i=1, #username do 
        local toprint = username:sub(i, i) 
        if toprint == litery[i] then 
            outputChatBox(toprint) 
        else 
            (...) 
  

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...