Anderl
Members-
Posts
2,266 -
Joined
-
Last visited
Everything posted by Anderl
-
1st example will not work, 'hey' is nowhere declared.
-
Have you ever tried RAM disks? And don't SSDs have a limit of write and reads? Ok, I guess my answer sounded quite rude, i'm sorry. Your answer just wasn't the kind I wanted.
-
I already know that, but that's not most people's recommendation. That's why I'm here asking someone with knowledge in that area (and I mean really have knowledge, doesn't mean because you have a SSD that you know anything in that area since most people at the moment buy these overpriced disks just because yes, I'm not saying you don't know anything in that area tho).
-
Your question has already been answered in the Portuguese section.
-
It will wait for 'doSomething' to finish and then call the next. You can use coroutines to "bypass" that, though (it's like a threading library, built into LUA).
-
You've got to control threads by yourself when loading LUA code in a software AFAIK (in this case, it's the MTASA). Not sure if this is what you're talking about.
-
Hi guys, I've been searching about which option would give me more performance while building projects and the software's speed itself (not sure how would I express that, I mean, software's performance while programming, using it) but I still wasn't able to come to a conclusion. Is it better to get a solid-state disk or more RAM? I also found some things about RAM disks, some people said they've got a big boost with it, though I also saw people saying it doesn't boost up anything. I'd like an opinion of someone who has knowledge in that area and that, of course, uses Visual Studio. I know this might not be the right place to be asking such things, but I'm sure someone here can answer this.
-
Just in case someone thinks that an array with only numbers as indexes is an indexed array too, no, it isn't. An array needs all indexes in the right order to be an indexed array. Not really, "i" can be anything else, and it has the value of the index (example: table["example"] = "example_1"; --here, "example" is the index, and it IS NOT a number). Not the best explanation, but you can say that.
-
I don't see any problem with the 'end's.
-
Most likely it's from your internet, or the server (if that happens in a single server).
-
function enum ( vars ) assert ( vars, "no values in enum declaration" ); for enum_name, int in pairs ( vars ) do _G[enum_name] = int; end end --Example: enum { COLOR_A = 1, COLOR_B = 2, COLOR_C = 3 }; local someValue; function setValue ( str ) if ( str:find ( "a", 0 ) ) then someValue = COLOR_A; elseif ( str:find ( "b", 0 ) ) then someValue = COLOR_B; elseif ( str:find ( "c", 0 ) ) then someValue = COLOR_C; end end setValue ( "b" ); --lets see: if ( someValue == COLOR_A ) then outputChatBox ( "COLOR_A" ); elseif ( someValue == COLOR_B ) then outputChatBox ( "COLOR_B" ); elseif ( someValue == COLOR_C ) then outputChatBox ( "COLOR_C" ); else outputChatBox ( "Something has gone wrong." ); end But you'll still need to add 1, 2, 3, 4, etc. in each value unless you use strings instead of just COLOR_A, COLOR_B and you'd also need to change the for loop in the "enum" function, unlike C/C++ where it automatically sets a number to each value (in order).
-
That is not natively possible in LUA, but you can emulate it.
-
http://www.lua.org/pil/11.2.html I guess that would explain everything. If you need to know something more, you can search on that website. If you don't find something, just come back.
-
- Basic LUA knowledge and.. fileCreate fileOpen fileRead fileWrite fileClose outputChatBox If you just don't have enough patience to create a basic interpreter to make something like INI files, use XML functions instead (if you're going to store a small amount of things).
-
Onde você viu que as cutscenes estão em um ficheiro .img e que tem ficheiros de modelos 3D lá?
-
You should copy "libmysql.dll" from 'deathmatch' folder to 'server'.
-
Nada haver.. http://pt.wikipedia.org/wiki/Cutscene
-
I never seen such old PC running BF3 with these FPS, especially at ultra settings. Is it black magic?
-
In which resolution? lol
-
You also had a space in the event name. And use pre-defined variables instead: https://wiki.multitheftauto.com/wiki/Pre ... ables_list
-
I remember that not working in Linux, not sure if it has been solved already.
-
I wonder why would you need it.
-
Simply showing yourself creating such simple scripts doesn't help at all, begginers won't understand it.
-
No, that does not make sense ( both last code and this one ).
