Jump to content

Vivalavido

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Vivalavido

  • Rank
    Rat

Details

  • Gang
    themtaproject
  1. Okay the last few day's ive been notified in my server console about an error, basicly this one: [22:21:13] ERROR: ERROR: Infinite/too long execution (roam) [22:21:13] ERROR: Aborting; infinite running script roam is my freeroam resource, and ive noticed that once the last player leaves it gives me this error. What can it possibly be?
  2. Okay, I have done that now. It works perfectly! BUT: Only server sided it loops because look: --SERVER: local getSiteInfoDatabase = mysql_query( connect_mysql, "SELECT * FROM `messages` WHERE `to`='" .. userName .. "' " ) if (getSiteInfoDatabase) then local numRows = mysql_num_rows(getSiteInfoDatabase) if (numRows >= 1) then while true do local row = mysql_fetch_assoc(getSiteInfoDatabase) if (not row) then break end outputChatBox(row['title']) subject = row['title'] end else return nil end end Now what I do is make a var off the row['title] in subject. triggerCli
  3. "bad argument #1 to 'ipairs' (table expected, got nil) Doesnt it mean the table is empty? ( Because it isnt.. )
  4. So, I actually have to make a table first like: local table = {} Then I go further with: local getSiteInfoDatabase = mysql_query( connect_mysql, "SELECT * FROM `messages` WHERE `to`='"..userName.."' " ) theReciever = mysql_fetch_assoc( getSiteInfoDatabase )l subject = theReciever['title'] for theReciever,subject in ipairs(table) do outputChatBox( subject ) end I dont understand wich var's are necceserly at the for statement. Im not realy expierenced with loops
  5. Hello, I have a question bout making a loop in LUA, im expierenced in it with PHP, but not with LUA. Heres how its done in PHP: while($row = mysql_fetch_array( $result )) { echo $row[subject]; echo "<br />"; } But how am I suposed to do this in LUA? I came this far: local getSiteInfoDatabase = mysql_query( connect_mysql, "SELECT * FROM `messages` WHERE `to`='"..userName.."' " ) theReciever = mysql_fetch_assoc( getSiteInfoDatabase ) local subject = theReciever['title'] So I want to get all the data from theReciever[title], so I need a loop, but how?
  6. At least he is being honest. To my vision, xbost's script should work just fine. True, but saying your lazy and not even have the intention to learn LUA, is just wrong imo than asking others to do it for you.
  7. I think this is the newer way to get scripts written for themselfs, just say "Sorry" and "Im lazy" alot
  8. function OnPlayerChat(message, messageType) cancelEvent() outputChatBox("[Player] ".. getPlayerName(source) .. " : " .. message) end
  9. Are you switching subject suddenly? MySQL is little different. SQLite is easier. SQLite doesnt always have to be easier. Some people take up things mentally diffrent than others do.
  10. http://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL
  11. Have you just been busy with PHP maybe? Since you use the ";" tags at the end haha.
  12. Have you just been busy with PHP maybe? Since you use the ";" tags at the end haha.
  13. Change: if element == "player" then local player = getPlayerName(element) local level = getPlayerWantedLevel(element) To: if element == "player" then local player = getPlayerName(Spieler) local level = getPlayerWantedLevel(Spieler) Your getting an bad argument because your trying to get things from "element" Wich isnt a variable.
  14. I was wondering, I made a GUI, wich has an Gridlist. Now I also have a database ,wich hold some members.. How would I load in the database stuff in a client sided script? Is there something like callServer? Cause I think triggerServerEvent would be going back and forth.. Like I triggerServerEvent in cleinside, then I triggerClientEvent back.. That would be a drag.. Any other solutions? Thanks!
×
×
  • Create New...