• What Do You Need Help With? V6
    7,544 replies, posted
What would cause a texture to only be correctly applied to half of a model? It seems weird, like half of the texcoords work and half of them don't. Pic: [img]http://i.imgur.com/Unmta5V.png[/img] Any ideas? [editline]30th September 2014[/editline] This was exported from Blender using the IQM exporter btw, if that helps at all.
Hi, I'm writing a script that checks for active IPs on my network and i'm just writing text files for now to see which ones are active, but im not sure what's wrong but when I run it, its always saying they're active. This is a batch script. Any advice I would appreciate it! [CODE] FOR /L %%G IN (1,1,255) DO FOR /L %%A IN (1,1,255) DO start ping ***.***.%%A.%%G -n 1 | FIND /i "TTL=" >> C:/Users/***/Desktop/Net/ip%%A%%G.txt pause [/CODE]
[QUOTE=Gadfly Jr;46114770]Hi, I'm writing a script that checks for active IPs on my network and i'm just writing text files for now to see which ones are active, but im not sure what's wrong but when I run it, its always saying they're active. This is a batch script. Any advice I would appreciate it! [/QUOTE] You're always piping it to a file, even if the FIND returns nothing, essentially creating blank files. My batch is a bit rusty but something along these lines should work: [code] @echo off FOR /L %%G IN (1,1,255) DO FOR /L %%A IN (1,1,255) DO ping 192.168.%%A.%%G -n 1 | FIND /i "TTL=" >nul && echo found 192.168.%%A.%%G pause [/code] Also your loops are doing 1-255, while the actual range is 0-255
Yeah, i'm just starting to learn :P. If I were to append it to a text file, this would be the appropriate way? [CODE] @echo off FOR /L %%G IN (1,1,255) DO FOR /L %%A IN (1,1,255) DO ping 192.168.%%A.%%G -n 1 | FIND /i "TTL=" >nul && echo found 192.168.%%A.%%G >> C:/**/txt%%A%%G.txt pause [/CODE] Would that be correct?
Anyone have some tutorials or guides for making simple client-server interaction? It can be pretty basic and not getting into language internals, but I am trying to make a turn-based Love2d game for 2 players
[QUOTE=Bumrang;46114511]What would cause a texture to only be correctly applied to half of a model? It seems weird, like half of the texcoords work and half of them don't. Pic: [img]http://i.imgur.com/Unmta5V.png[/img] Any ideas? [editline]30th September 2014[/editline] This was exported from Blender using the IQM exporter btw, if that helps at all.[/QUOTE] That's most likely the wrap mode, you'll likely have to set it to flipped/mirrored or something like that along at least one axis. Right now it seems to be in Clip mode.
[QUOTE=Tamschi;46116713]That's most likely the wrap mode, you'll likely have to set it to flipped/mirrored or something like that along at least one axis. Right now it seems to be in Clip mode.[/QUOTE] that worked thanks, heh thats what i get for copy-pasting texparameters from different render function i had [t]http://i.imgur.com/bffhDih.png[/t]
So first programming class here, there has to be a better way of handling things like.. [URL]https://github.com/Proclivitas/C-SHARP-140/blob/master/Chapter 6/Problem 7/Form1.cs[/URL] Right? Specifically lines 60 - 93; there has to be a better way of validating all of that without branching it out so much. It seems like it would be very hard to maintain in large applications. Is there something I haven't been exposed to for things like this since it is only my first class? Or is this how the world works and I'm going to always be disgusted with how this looks. >.< Edit: I have found [url]http://www.c-sharpcorner.com/UploadFile/DipalChoksi/UsingErrorProviderContolinWindowsFormsandCSharp11242005010829AM/UsingErrorProviderContolinWindowsFormsandCSharp.aspx[/url] which looks like something that can be used. Is this used for production style code?
So I've been messing around in Unity3D and I've come across a script error that makes no sense to me. [csharp] Vector3[] axes = new Vector3[3] { Vector3.forward, Vector3.up, Vector3.right }; [/csharp] I get no errors from Mono, but Unity complains about "NullReferenceException: Object reference not set to an instance of an object". The error is happening with [csharp]for (int i = 0; i < axes.Length; i++) {[/csharp] The array is defined in class scope.
[QUOTE=vexx21322;46121008]So I've been messing around in Unity3D and I've come across a script error that makes no sense to me. [/QUOTE] Post the whole code, and are you sure the inspector or whatever isn't overriding your array
how would you do cross platform gui development in c#?
[QUOTE=elevate;46121745]how would you do cross platform gui development in c#?[/QUOTE] WinForms probably, it's almost fully supported by Mono. Alternatively I'd just skin my application with a native GUI for each system, that yields by far the best results and is not difficult if you structure it properly. [editline]1st October 2014[/editline] You [I]could[/I] use a browser/HTML GUI, but they are really terrible and eat RAM like crazy. [del]Skype recently (finally) switched back to native (but custom or heavily skinned)[/del], it's much nicer now. Seems like it's still HTML (the memory usage and possibility to select parts of it support that), but they skinned it so much it's barely noticeable. Also at least part of it is native because they do stuff that's plain impossible with a web page. They also got rid of a ton of the bitmap resources, so it's at least a little bit more lightweight now. [editline]1st October 2014[/editline] I think the content area is still a web page, the rest is definitely native. The content area is also by far the weakest part of the program. [editline]1st October 2014[/editline] The most damning piece of evidence is probably that that part has a different scroll bar :v:
Linux-first .NET applications generally use Gtk#.
Does anyone know how to import a [B].b3d[/B] into Blender or Unity without losing its animations?
[QUOTE=Goz3rr;46121165]Post the whole code, and are you sure the inspector or whatever isn't overriding your array[/QUOTE] [csharp] using UnityEngine; using System.Collections; public class CameraAxes : MonoBehaviour { public Vector3 target = new Vector3(0, 0, 0); public double axesSize = 1.0; Material linemat = new Material(Shader.Find("Custom/UnlitColor")); private Vector3[] axes = new Vector3[3] { Vector3.forward, Vector3.up, Vector3.right }; private Color[] axesColor = new Color[3] { Color.red, Color.green, Color.blue }; void Start () { } void DrawAxis(double size) { double halfsize = size / 2.0d; for (int i = 0; i < axes.Length; i++) { GL.PushMatrix(); GL.LoadProjectionMatrix(camera.projectionMatrix); GL.LoadIdentity(); GL.MultMatrix(camera.worldToCameraMatrix); linemat.color = axesColor[i]; linemat.SetPass(0); GL.Begin(GL.LINES); GL.Vertex(target + (axes[i] * (float)halfsize)); GL.Vertex(target + (axes[i] * (float)-halfsize)); GL.End(); GL.PopMatrix(); } } void OnPostRender() { DrawAxis(axesSize); } void Update () { } } [/csharp] What do you mean overriding?
[QUOTE=vexx21322;46121008]So I've been messing around in Unity3D and I've come across a script error that makes no sense to me. [csharp] Vector3[] axes = new Vector3[3] { Vector3.forward, Vector3.up, Vector3.right }; [/csharp] I get no errors from Mono, but Unity complains about "NullReferenceException: Object reference not set to an instance of an object". The error is happening with [csharp]for (int i = 0; i < axes.Length; i++) {[/csharp] The array is defined in class scope.[/QUOTE] As far as I know, you can not use .Length for arrays in Unity. You have to use a List<Vector3>, if I recall correctly. You might have to include "Systems.Collections.Generic.List"
[QUOTE=elevate;46121745]how would you do cross platform gui development in c#?[/QUOTE] Xamarin Studio?
[QUOTE=Cyberuben;46122739]As far as I know, you can not use .Length for arrays in Unity. You have to use a List<Vector3>, if I recall correctly. You might have to include "Systems.Collections.Generic.List"[/QUOTE] Still errors on the loop.
[QUOTE=vexx21322;46122865]Still errors on the loop.[/QUOTE] According to [url=http://msdn.microsoft.com/en-us/library/6sh2ey19(v=vs.110).aspx]this[/url], you should use Count, not Length. -edit- Actually, are you sure that doing this won't solve your problem? [code] Vector3 myArray = new Vector3[3]; myArray[0] = vectorOne; myArray[1] = vectorTwo; myArray[2] = vectorThree; [/code] Try that, and instead of using Length or Count, just make the size of the array a variable.
[QUOTE=elevate;46121745]how would you do cross platform gui development in c#?[/QUOTE] As others have mentioned in this thread, you could go ahead and use WinForms in combination with Mono - but there's a caveat: as far as I can tell, they'll only look good on Windows. On Linux and OS X, they'll look like [url=http://www.voidspace.org.uk/python/weblog/images/multidoc-mono.jpg]this[/url] and [url=http://markheath.net/posts/files/running-windows-forms-on-linux-with-mono-2.png]this,[/url] respectively. It's some weird hybrid of the Windows Classic look. Your best bet would probably be [url=http://mono.github.io/website/docs/gui/gtksharp/]GTK#,[/url] to my knowledge it at least attempts to look native on each platform (it may actually be using native controls, I'm not sure). The only (possible) issue is that you'll need to ship extra binaries with whatever you're building.
[QUOTE=Cyberuben;46123142]According to [url=http://msdn.microsoft.com/en-us/library/6sh2ey19(v=vs.110).aspx]this[/url], you should use Count, not Length. -edit- Actually, are you sure that doing this won't solve your problem? [code] Vector3 myArray = new Vector3[3]; myArray[0] = vectorOne; myArray[1] = vectorTwo; myArray[2] = vectorThree; [/code] Try that, and instead of using Length or Count, just make the size of the array a variable.[/QUOTE] Didn't help. Even if the data structure is valid and length/count = 3, trying to index them also causes the same error to appear. None of this makes any sense to me.
[QUOTE=vexx21322;46123524]Didn't help. Even if the data structure is valid and length/count = 3, trying to index them also causes the same error to appear. None of this makes any sense to me.[/QUOTE] Excuse me for my stupidity. I meant something like this: [code]Vector3 myArray[]; void Start() { myArray = new Vector3[3]; myArray[0] = vectorOne; myArray[1] = vectorTwo; myArray[2] = vectorThree; } [/code]
[QUOTE=Cyberuben;46123905]Excuse me for my stupidity. I meant something like this: [code]Vector3 myArray[]; void Start() { myArray = new Vector3[3]; myArray[0] = vectorOne; myArray[1] = vectorTwo; myArray[2] = vectorThree; } [/code][/QUOTE] Yeah, I tried that as well just in case.
Got few questions about databases: 1) What is it called when all user/game data and personal info is stored on separate databases on completely different servers or even countries/locations? 2) Where would I start with learning how to adopt such "system" using PHP? or is it more than just PHP? 3) How badly does it affect performance when say user ID is stored in UK server, then username/login name is stored in German server for example and then user password is stored in US servers? I mean from single query it makes it into 3? 4) What's the best way to create a secure database with above "system", being encypted? 5) Is it possible to somehow make it constantly move data around my 3 servers? (UK, Germany and US) so that every day or specific hour the storage from question 3 would change so say user ID is stored in German servers now. The reason I am asking for this is that apparently my lecturer and college committee is pretty butthurt about security and encryption (well I am doing Networking, Security and Mobile Tech) so I am pretty sure if I could adopt somewhat reasonable system with above "methods" that would give me a big +
[QUOTE=KinderBueno;46126765]Got few questions about databases: 1) What is it called when all user/game data and personal info is stored on separate databases on completely different servers or even countries/locations? 2) Where would I start with learning how to adopt such "system" using PHP? or is it more than just PHP? 3) How badly does it affect performance when say user ID is stored in UK server, then username/login name is stored in German server for example and then user password is stored in US servers? I mean from single query it makes it into 3? 4) What's the best way to create a secure database with above "system", being encypted? 5) Is it possible to somehow make it constantly move data around my 3 servers? (UK, Germany and US) so that every day or specific hour the storage from question 3 would change so say user ID is stored in German servers now. The reason I am asking for this is that apparently my lecturer and college committee is pretty butthurt about security and encryption (well I am doing Networking, Security and Mobile Tech) so I am pretty sure if I could adopt somewhat reasonable system with above "methods" that would give me a big +[/QUOTE] [url]http://sqeets.com/articles/connecting-or-accessing-a-mysql-database-with-c-sharp/[/url]
[QUOTE=Proclivitas;46126984][url]http://sqeets.com/articles/connecting-or-accessing-a-mysql-database-with-c-sharp/[/url][/QUOTE] That's not quite what I was looking for, I know what MySQL is but I use it with PHP only so far.
Line 94-102 [url]https://github.com/Proclivitas/C-SHARP-140/blob/master/Chapter%206/Problem%207%20Experimental/Form1.cs[/url] How come if I have a MessageBox.Show during my event it will remove the existing text from my textbox and then type the character I had pressed to call the PreviewKeyDown event, but if I don't have that function call it won't remove the text and will simply place the letter I typed before the default text? Is there some sort or priority with the MessageBox.Show drawing to the screen before the key gets drawn?
Learning some AngularJS because it would look good on my resume (lots of jobs asking for it). But i have hit a snag. I followed a tutorial for a single page todo app, but i am unable to delete any of my todo's. It comes up with a 404 error saying it can't find the todo item for the specified id. For example: [code]DELETE http://localhost:8080/api/todos/542c8ccba633d5d01cc612fa 404 (Not Found) angular.js:8560 Delete error: Cannot DELETE /api/todos/542c8ccba633d5d01cc612fa[/code] Creating and getting todo items is no problem. The stuff i'm using is MongoDB, Express, Angular en Node. My code is here: [url]https://gist.github.com/arxae/5bfa8c08204faaedae81[/url] I have looked, rewritten, tripple checked everything about the delete stuff. Google turned up nothing too. Using the latest version of angular didn't fix it either. It's probably something really stupid, but any help would be appreciated :D
I'm trying to get a string to justify text so that if letters in a word go beyond a certain amount (paragraphlength) they wrap to the next line, but for some reason it seems to fail at random points regardless of what I"m doing. Does anyone know a solution to this? [code] //start the loop, i is the iterator n = i;//skip through spaces while (n < string.length() && (string.charAt(n) == ' ' || string.charAt(n) == '\n' ||string.charAt(n) == '\r')) { n+= 1; } //find how many letters are left for (; n < string.length();n++) { if (string.charAt(n) == ' ' || string.charAt(n) == '\t' || string.length()-1 == n) { letters_left = n-i; n = string.length(); } }//letters_left <= 0 && if (((i_test+letters_left)%paragraphlength < letters_left))//|| string.charAt(i) == '\n' || string.charAt(i) == '\r') { drawlength = 0; paragraphline += 1; i_test = i_test + letters_left; } letters_left -= 1; //draw the text at the index of i [/code]
I came here a while ago, but I want to say thanks to the people who gave me suggestions for c++ Although I some prior knowledge of Java, I'm having a easier time coding on c++. The Class I'm taking for C++ is amazing.
Sorry, you need to Log In to post a reply to this thread.