• What Do You Need Help With? V6
    7,544 replies, posted
[QUOTE=Thumbtacks;41496234]Oh, okay. I was just copying it from another addon that happened to use it (this is for wow, if that wasn't already obvious) I have a ton of questions but I'm trying not to be annoying with them. Since the first bit uses message,sender,etc. and I want whatever name is "sender" to be used in Reply(playerName) as playerName, if I call it as Reply(sender), will that make sender == playerName? I asked that REALLY poorly, but hopefully you get what I mean.[/QUOTE] Yea that's right. Reply(sender) will pass whatever the sender variable is storing to the Reply function such that in the body of that function playerName will be whatever sender was. [editline]17th July 2013[/editline] [QUOTE=Thumbtacks;41496234]also if there's no way to suspend code, what if i wrote it like this [code]function Reply(playerName) local nCurrentTime = GetTime() if (nCurrentTime - nLastMsgTime >= 10) then send reply else Reply(playerName) end[/code] Wouldn't that basically loop it until that condition is true?[/QUOTE] It would, but it would stall the execution of the program that Lua is embedded in (WoW in this instance).
Okay thanks. It's weird. Lua seems to be really easy, but I still have no idea what I'm doing half the time. Also I don't know Lua, so that might explain it. I appreciate the help. ^^ [editline]17th July 2013[/editline] damn. well...that's unfortunate.
[QUOTE=Thumbtacks;41496234]Oh, okay. I was just copying it from another addon that happened to use it (this is for wow, if that wasn't already obvious) I have a ton of questions but I'm trying not to be annoying with them. Since the first bit uses message,sender,etc. and I want whatever name is "sender" to be used in Reply(playerName) as playerName, if I call it as Reply(sender), will that make sender == playerName? I asked that REALLY poorly, but hopefully you get what I mean. [editline]17th July 2013[/editline] also if there's no way to suspend code, what if i wrote it like this [code]function Reply(playerName) local nCurrentTime = GetTime() if (nCurrentTime - nLastMsgTime >= 10) then send reply else Reply(playerName) end[/code] Wouldn't that basically loop it until that condition is true?[/QUOTE] If you don't need the first return-value (message) you can do _, sender = .... That would not loop at all. That function will execute once, when you call it from CHAT_MSG_WHISPER and return. And make sure to initialize nLastMsgTime somewhere, else you'll get an error about doing arithmetic with nil (nil indicates an undefined value in Lua, a bit like nullptr in C++ or NULL in C when dealing with pointers).
GetTime returns the system uptime of your computer in seconds, which should prevent any weird things from happening if you got a whisper at like 11:59:59 so it won't reset at 12 or 0 or something. The only reason I want to implement that stall time at all is to prevent it from autoreplying to people you don't want it to, so if the user sends a message within that window it would reset the 10 seconds, allowing you to have an ACTUAL conversation as well as being an asshole to whoever else happens to be whispering you. Come to think of it I could get around that (probably) by saving the name of the sender and then only replying to that specific name (if there's no reply in like ten minutes, clear the saved name or something. But I'll deal with that later when I figure out how this all works. Baby steps. I still need to write the hardest part, which is scanning the incoming message for keywords and then piecing a reply together. I think I can do it with strMatch but I'll need to be fancy with it. [editline]17th July 2013[/editline] also if I wrote something like this [code]function firstFunc --do something useless x = 3 x = secondFunc(x) x = thirdFunc(x) p(x) end [/code] how would it go through? would it set x = 3, then call and run secondFunc and return x, then do the same with thirdFunc x, and then print it? Or would it be smarter to do x = thirdFunc(x) within secondFunc? Basically i've got a function to compile the message and then another one to actually SEND it, but if that's not going to work I might just put the two together. I'm trying to keep this organized and not just write the whole thing as one giant sprawling mess. [editline]17th July 2013[/editline] (and also i didn't notice you mention it before but i need to keep track of the actual message contents because i need to pass it to another function to pick it apart and figure out vaguely what they said)
Either way is fine. The way you wrote the sample code looks better designed though IMO. Note however that you "overwrite" the previous contents of x with whatever secondFunc returns before calling thirdFunc, and the same with the return value of thirdFunc before calling p. I'm not sure what strMatch is, but if it doesn't seem to be doing what you want you can have a look at the standard Lua function [url=http://www.lua.org/manual/5.1/manual.html#pdf-string.match]string.match[/url] or [url=http://www.lua.org/manual/5.1/manual.html#pdf-string.gmatch]string.gmatch[/url] .
that's okay, i was planning on making it something like [code]function frmEventFrame:CHAT_MSG_WHISPER(event, ...) message, sender = ... nLastMsgTime = GetTime() -- will probably get rid of this --scan message for keywords response = processInput(message) --scans and puts together reply (i have the base code for this part) Reply(response, sender) end [/code] If I do this, can I just write processInput() and Reply() somewhere else in the lua file and it'll call them as necessary? Or does it have to be before this function that calls them? Or do I need to define the functions right when I call them? [editline]17th July 2013[/editline] and yeha i meant string.Match. my bad.
They just need to be defined before they're called (at run-time). You should probably just play around with the Lua REPL and stand-alone Lua interpreter. [url]http://www.lua.org/download.html[/url]
I'm fucking around with the lua developer console thing, I just can't actually test any of it outside wow because wow supplies the event hooks. also is there a way to do a string match for the contents of a table? Like check to see if a string (or part of a string) matches the contents of one part of a table without having to search through the ENTIRE table again and again and again? I figure if I make a couple tables and just throw in a bunch of recognition phrases, it can search until it finds a match, then make note of that table number (or key or whatever) and then work from there. I have no idea if it will work, though. I know how I'd do it in C++ but from what I've seen so far they're not particularly similar. Edit: I promise this is my last question. It's the one thing I haven't figured out yet. I asked a friend and he told me to try this: [code]for k, v in string.gmatch(message, "[%w']+ [%w']+ [%w']+ [%w']+ [%w']+ [%w']+ etc)") do for x = 1, table.getn(AGTkeyword), 1 do if AGTkeyword[x].key == k then return x end [/code] I understand all of it except the first line. What would [%w']+ [%w']+ [%w']+ [%w']+ etc do, exactly? Other than that, it looks like it would totally work. Return x, then you know the key and you can work from there. [code]
Anyone know sql here? I'm having trouble adding a check constraint to see if an entry begins with a certain letter. I got it, it's [code]ALTER TABLE tablename ADD CONSTRAINT constraintname CHECK(columnname NOT LIKE 'q%');[/code]
[QUOTE=Thumbtacks;41497216]I'm fucking around with the lua developer console thing, I just can't actually test any of it outside wow because wow supplies the event hooks. also is there a way to do a string match for the contents of a table? Like check to see if a string (or part of a string) matches the contents of one part of a table without having to search through the ENTIRE table again and again and again? I figure if I make a couple tables and just throw in a bunch of recognition phrases, it can search until it finds a match, then make note of that table number (or key or whatever) and then work from there. I have no idea if it will work, though. I know how I'd do it in C++ but from what I've seen so far they're not particularly similar. Edit: I promise this is my last question. It's the one thing I haven't figured out yet. I asked a friend and he told me to try this: [code]for k, v in string.gmatch(message, "[%w']+ [%w']+ [%w']+ [%w']+ [%w']+ [%w']+ etc)") do for x = 1, table.getn(AGTkeyword), 1 do if AGTkeyword[x].key == k then return x end [/code] I understand all of it except the first line. What would [%w']+ [%w']+ [%w']+ [%w']+ etc do, exactly? Other than that, it looks like it would totally work. Return x, then you know the key and you can work from there. [code][/QUOTE] Sure, but you can test how for example function calls work :) About matching the contents with entries of the table, just loop through each entry in the table and match it against your input. I'm not 100% sure what you mean though, since I don't see any other way of doing that. About the [%w] stuff, see [url=http://www.lua.org/manual/5.1/manual.html#5.4.1]patterns[/url]. [editline]17th July 2013[/editline] Use #AGTkeyword instead of table.getn. They're functionally equivalent, but table.getn was deprecated. In fact, this is more idiomatic Lua code: [code]for index, keyword in ipairs(AGTkeyword) do if keyword.key == k then return index end end[/code] And I believe you just want [%w']+ one time, not repeated a bunch of times. Also just the variable k then, no v (since you only specify one pattern).
I think I understand. Sort of. So it'd look like this? [code]for k in string.gmatch(message, "[%w']+)") do for index, keyword in ipairs(AGTkeyword) do if keyword.key == k then return index end end[/code] (Also why is the ' there in [%w']+?) And thanks for all your help, man. I really really appreciate it. [editline]17th July 2013[/editline] I tried to google it but google doesn't recognize symbols, so I couldn't.
I just took the pattern you posted. That thing in the square brackets matches character within the brackets, the %w stands for alphanumeric characters (0-9A-Za-z) and the ' is a literal single quote. See [url=http://www.lua.org/manual/5.1/manual.html#5.4.1]patterns[/url]. [editline]18th July 2013[/editline] You're also missing an end. You need one for the [i]if[/i], one for the inner [i]for[/i] and one for the outer [i]for[/i].
[QUOTE=ZeekyHBomb;41503350]I just took the pattern you posted. That thing in the square brackets matches character within the brackets, the %w stands for alphanumeric characters (0-9A-Za-z) and the ' is a literal single quote. See [URL="http://www.lua.org/manual/5.1/manual.html#5.4.1"]patterns[/URL]. [editline]18th July 2013[/editline] You're also missing an end. You need one for the [I]if[/I], one for the inner [I]for[/I] and one for the outer [I]for[/I].[/QUOTE] And that's why it's very important to indent
[QUOTE=SweetSwifter;41491260]I've recently gotten SFML and begun working with it. Although I've had C++ programming for four years on my previous college, I've not done it for a year, so it took a bit getting back into things. I got SFML working with the dynamically linked DLLs, and managed to compile the basic shape-drawing program and got it all to work. I set up my gamestate switch, and made a testclass to test some drawing and stuff, going through the tutorials on the SFML website. However, for some reason I just cannot get stuff to draw to the screen. Perhaps you guys can see what's wrong? Here's the main: [code]int main() { gamestate = GAMESTATE_GAME; loadGraphics(); ship.Init(200,200); while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type == sf::Event::Closed) window.close(); } switch(gamestate){ case GAMESTATE_INTRO: window.clear(); window.display(); break; case GAMESTATE_MAINMENU: window.clear(); window.display(); break; case GAMESTATE_GAME: window.clear(); ship.Handle(); ship.Draw(); window.display(); break; case GAMESTATE_PAUSE: window.clear(); window.display(); break; } } return 0; }[/code] And the testclass Draw() function. [code]void testClass::Draw(){ if (drawActive){ std::cout << "Drawing bananaship at: " << posX << "," << posY << std::endl; sprBananaShip.setOrigin(28,28); sprBananaShip.move(posX,posY); testShape.setOrigin(50.f,50.f); testShape.move(posX,posY); testShape.setFillColor(sf::Color::Red); window.draw(sprBananaShip); window.draw(testShape); } }[/code] I first tested it with a sprite, but after that failed I tried it with a shape. Both the sprite and shape are defined elsewhere, and I can confirm the sprite loads just fine (after I changed the working directory and whatnot). The program compiles, and the std::cout prints that the function is being handled, and that the bananaShip should be drawn at 200,200, but the screen remains black. Using SFML 2.0 on Visual Studio 2012.[/QUOTE] Anyone? :(
[QUOTE=SweetSwifter;41503659]Anyone? :([/QUOTE] If it's not too much, can you send through the entire project? Mabe put it on GitHub
See if [url=http://www.sfml-dev.org/documentation/2.0/]this sample code[/url] works. If not, open a [url=https://github.com/LaurentGomila/SFML/issues]bug report[/url]. If it does, reduce your code to a minimal test-case and look what you are doing differently.
[QUOTE=Asgard;41503808]If it's not too much, can you send through the entire project? Mabe put it on GitHub[/QUOTE] I'll try the sample code suggested by ZeekyHBomb first. If in the end it still fails, I'll see if I can put the project on GitHub. I have to admit though that I'm very new to working on coding projects that involve multiple people, so it might take me a bit to get it up on GitHub. [editline]18th July 2013[/editline] Okay, interesting. I removed the sprite drawing and resorted to only using the red circle shape. When the SFML buffer window opens, I see the shape being drawn for a fraction, and then it turns black, even though I draw the shape every frame onto the second buffer, and replace the first buffer with that second one, clearing it on the start of the next frame and doing it again. [editline]18th July 2013[/editline] I finally figured it out, and it turns out that - like I thought - I'm an idiot. I was using the .move transformation function, which moves an entity a relative amount. So the first frame it'd move 200 in x, and 200 in y. Second frame again further away, and by the third frame it'd be out of the screen. Thanks for the help anyway guys. Using .setPosition now, which works.
Makes me wonder if it's prudent to differentiate between absolute and relative positions via strong type safety.
In Visual Studio, how would I detect if the Stop Debugging button was pressed. When it's pressed my process stops so I need to update a variable when the button is pressed. How would I do this?
[QUOTE=Over-Run;41505044]In Visual Studio, how would I detect if the Stop Debugging button was pressed. When it's pressed my process stops so I need to update a variable when the button is pressed. How would I do this?[/QUOTE] When you press Stop Debugging the application is [I]killed[/I] no application specific events are triggered no code is ran no windows msg are send to the application. However, the visual studio debugger sends some system events on what its doing. EDIT: [URL]http://msdn.microsoft.com/en-us/library/vstudio/envdte.debuggerevents.aspx[/URL] [URL]http://msdn.microsoft.com/en-us/library/vstudio/envdte.debuggereventsclass.onenterdesignmode.aspx[/URL] I am unsure tho if this is called before/after and if its even safe to hook this from within the application thats subject to debugging.
[QUOTE=ColdFusion;41506316]When you press Stop Debugging the application is [I]killed[/I] no application specific events are triggered no code is ran no windows msg are send to the application. However, the visual studio debugger sends some system events on what its doing. EDIT: [URL]http://msdn.microsoft.com/en-us/library/vstudio/envdte.debuggerevents.aspx[/URL] [URL]http://msdn.microsoft.com/en-us/library/vstudio/envdte.debuggereventsclass.onenterdesignmode.aspx[/URL] I am unsure tho if this is called before/after and if its even safe to hook this from within the application thats subject to debugging.[/QUOTE] Is the visual studio debugger process called "w3wp"? That's the process I attach in my program that I have to check for. Also, when I have my plugin created and working, how do I share it with people? Like I gave the Addin file and dll file to a co worker and he put it in his Addin folder but it's not showing up in Visual Studio. What do you have to do to make it work? [B]EDIT [/B] Okay so I think you have to copy the .Addin file and the DLL file to the users Addins folder. However you have to change a line of code in the .Addin file, as it points to the directory on my machine, so they need to change it to look for their machine. Is there a way to automate this? Instead of the user having to go into the file and do it themselves?
It should be possible to package them for distribution, like the ones available from the extension gallery(?).
How would you do it so that you don't have to manually change the path on the new users machine?
[QUOTE=Over-Run;41507448]How would you do it so that you don't have to manually change the path on the new users machine?[/QUOTE] I only can find that what you probably want to create is a VSIX package. Can you use a relative path for the .dll, in case that's not possible?
[QUOTE=Tamschi;41507505]I only can find that what you probably want to create is a VSIX package. Can you use a relative path for the .dll, in case that's not possible?[/QUOTE] Envrioment Variables are maybe supported too.
Collision detection :P SFML C# to be At the moment i'm just doing (read, trying) the basics. Don't let the square go out of the screen. So far i have that when it should block the movment, it basically locks the square in place, unable to move :f Anyone has a good explanation on how to approach this?
Im trying to build something using glfw3 and windows 7 but I am getting all this: [code] 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1157): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1157): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1157): error C2146: syntax error : missing ',' before identifier 'glAccum' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1157): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1157): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1158): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1158): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1158): error C2146: syntax error : missing ',' before identifier 'glAlphaFunc' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1158): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1158): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1159): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1159): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1159): error C2146: syntax error : missing ',' before identifier 'glAreTexturesResident' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1159): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1159): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1160): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1160): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1160): error C2146: syntax error : missing ',' before identifier 'glArrayElement' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1160): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1160): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1161): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1161): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1161): error C2146: syntax error : missing ',' before identifier 'glBegin' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1161): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1161): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1162): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1162): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1162): error C2146: syntax error : missing ',' before identifier 'glBindTexture' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1162): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1162): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1163): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1163): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1163): error C2146: syntax error : missing ',' before identifier 'glBitmap' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1163): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1163): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1164): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1164): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1164): error C2146: syntax error : missing ',' before identifier 'glBlendFunc' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1164): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1164): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1165): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1165): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1165): error C2146: syntax error : missing ',' before identifier 'glCallList' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1165): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1165): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1166): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1166): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1166): error C2146: syntax error : missing ',' before identifier 'glCallLists' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1166): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1166): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1167): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1167): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1167): error C2146: syntax error : missing ',' before identifier 'glClear' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1167): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1167): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1168): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1168): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1168): error C2146: syntax error : missing ',' before identifier 'glClearAccum' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1168): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1168): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1169): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1169): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1169): error C2146: syntax error : missing ',' before identifier 'glClearColor' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1169): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1169): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1170): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1170): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1170): error C2146: syntax error : missing ',' before identifier 'glClearDepth' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1170): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1170): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1171): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1171): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1171): error C2146: syntax error : missing ',' before identifier 'glClearIndex' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1171): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1171): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1172): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1172): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1172): error C2146: syntax error : missing ',' before identifier 'glClearStencil' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1172): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1172): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1173): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1173): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1173): error C2146: syntax error : missing ',' before identifier 'glClipPlane' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1173): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1173): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1174): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1174): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1174): error C2146: syntax error : missing ',' before identifier 'glColor3b' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1174): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1174): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1175): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1175): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1175): error C2146: syntax error : missing ',' before identifier 'glColor3bv' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1175): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1175): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1176): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1176): error C2085: 'APIENTRY' : not in formal parameter list 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1176): error C2146: syntax error : missing ',' before identifier 'glColor3d' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1176): error C2143: syntax error : missing ';' before '(' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1176): error C2059: syntax error : ')' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1177): error C2054: expected '(' to follow 'WINGDIAPI' 1>c:\program files (x86)\windows kits\8.0\include\um\gl\gl.h(1177): fatal error C1003: error count exceeds 100; stopping compilation[/code]
What encryption method should I use to keep security up and the encrypted string length similar to the input? I'm using ase256 right now and it's a wee bit long.
AES-256 has a block size of 128 bits. That means the encrypted string has to be rounded to the next 16 bytes. And you need a terminating character or a length; the length is often encoded as a 64-bit integer (and it also serves to slightly improve security). So AES-256 should give you round_to_16(N+8) bytes of output for N bytes of input. If it seems that there's much more output than input, are you sure it's not outputting in hexadecimal? Because then it'd be twice as long.
[QUOTE=Richy19;41512060]Im trying to build something using glfw3 and windows 7 but I am getting all this: [code]--snip--[/code][/QUOTE] [url=https://www.opengl.org/archives/resources/faq/technical/gettingstarted.htm#0020]This[/url] suggests including Windows.h before gl.h.
Sorry, you need to Log In to post a reply to this thread.