Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. Anderl

    table.remove

    Yes, an iteration statement loops through all indexes in an array (you can call it array or table), 'i' and 'v' are the values from where the loop is (I just can't explain it better to you), you don't need to get the value of 'i' in the array again, simply use 'v' instead - that's what iteration statement vars are for, otherwise I'd use a while statement instead or anything else.
  2. That is exactly what has been said already, I just told him a second way to do it.
  3. Anderl

    table.remove

    I was not talking about array values. I was saying 'i' was already the value from the array.
  4. Anderl

    table.remove

    Because i is already the value, there is no need to get it again ( I also did some tests on the LUA interpreter and the condition "table == i" was false.
  5. Neither compiling files or using fileDelete will do any good. If you use compiler anyone will be able to decompile it, easily. If you use fileDelete, you can leave the server before the download ends and so having files already downloaded saved on the cache.
  6. Anderl

    table.remove

    Third time I repeat this: You do not need to call the index from the array (I mean this: myTable, it SHOULD be simply i)!
  7. Anderl

    table.remove

    Indexes aren't always numbers, they can be anything else (but by default, unless you add them by yourself, it will be numbers). And yes, in your example it will remove everything since no index is an element. On your last code, I didn't get some things: I already said you don't need that in iteration statements. Okay.. What is that? @IIYAMA, it's still not right. 'v' is the value, not an array. You can't do "v", it doesn't even make sense.
  8. Another way to protect is using loadstring and server-side file functions.
  9. Anderl

    table.remove

    In his example, indexes are numbers, so this will remove everything from the array. Also, "myTable[ i ]" is not needed inside an iteration statement.
  10. Esse código além de estar com erros, você está usando métodos bem maus ( não eficientes, cheios de eventos desnecessários ). Also, a menos que o veículo perseguidor esteja mesmo atrás do veículo sendo seguido, esse código simplesmente vai fazer o perseguidor seguir os mesmos controles que o sendo perseguido.
  11. Click here to see some very interesting things you should know, before COPYING.
  12. Para que foram as aspas quando fala de chamar funções? É assim que se diz, chamar uma função. Anyway, a minha opinião é a mesma que a do DNL291.
  13. If you read the code, you'll understand that all you're doing is "[index] = all text from the memo + new coordinates".
  14. Good. By the way, I'm going to check build time and software's responsiveness before buying anything to see if it's worth it, then I might get a SSD.
  15. http://lua.gts-stolberg.de/en/Variablen.php Anyway, that question is wrong. You should ask how to do it instead. From the server-side, when you do an iteration through the whole XML file, you declared an "index" variable. Pass it to the client event and you're done.
  16. That doesn't make sense, removing the '\n' wouldn't solve the problem, unless you're talking about a completely different thing and you just didn't explain it well.
  17. I didn't understand what you said, can you explain better?
  18. You need to set "tff" element's text to this: "current text + new coordinates": local text = string.format ( "%s \n%d, %d, %d", guiGetText ( tff ), xx, yy, zz ); guiSetText ( tff, text );
  19. Why would you want to put an array in an element? It will still be temporary.
  20. "Adivinhar" o caminho até ao jogador não é uma coisa assim tão fácil, a menos que seja em linha reta ou num mapa muito pequeno que só tem paredes.
  21. for index = 1, 1000000 do print ( "Did!" ); end Arrays in LUA start in index 1, not 0
  22. Anderl

    Font changing

    "dxDrawColorText" isn't the same as DxText lib.
  23. Tem que ter calma.. Só tinha passado um dia.
×
×
  • Create New...