Submitted by sixteen_faces on Mon, 12/29/2008 - 10:06.
Hi 1337HAX0R,
Welcome, and thanks for playing HackWars! I think that you'll find playing HackWars will help you learn to program, if you're willing to put in the time. HackScript (the in-game programming language) is very similar to the programming language C. At the moment we don't have really indepth programming tutorials, because we didn't want to reinvent the wheel (given the time it would take). There are already so many good programming tutorials available on the internet (also for C), that we usually encourage new programmers to start with a C tutorial, and then move on from there.
That being said, we will be constantly improving the HWiki over time, and hopefully it will include more walk-through tutorials for HackScript in time.
Also, people in the game are usually very willing to help if you have any trouble. You'll find the community really engaging and helpful.
Submitted by SatansPriest on Thu, 09/10/2009 - 14:21.
This is bullshit i cant even do the first challenge due to lack of explaining and the people in game aren't helpful at all (some guy even gave me shit about my name instead of helping me) i really think this game would be awesome if only it explained the code a little better. i use VB not C so i dont know this code very well
Submitted by Silverlight on Thu, 09/10/2009 - 14:38.
This does not use C. In fact it HW runs with Java. But the ingame script language resembles C. (C++ is about classes and some other stuff- which is another topic)
But no matter if you learned C, Pascal or Basic it should be easy to learn the basics of the other ones. And HackScript is very basic script language.
By the way I got the impression that you asked for a solution - and I refuse to give solutions because that way nobody would learn anything.
Sorry that the people in game weren't helpful, but we get the same questions a lot and sometimes it gets annoying answering them over and over. Since you weren't very specific about what problem you were having I'll try to give you some general knowledge about how the challenge works, bear with me if you already know this. I'm also going to avoid just posting the answer or anything to major (hopefully) since this would defeat the purpose of the challenge.
In order to complete this challenge you need to know a little bit about arrays and how to go through an array when you don't know the initial size.
When you run a challenge script it will be passed a string. In order to access this string in your code you would use the getInputString() function, which takes no arguments and returns a string. You can store that string in a variable and manipulate it however you want.
Once you have this string you'll need a way to isolate the different letters in the string. Go to this link: http://www.hackwars.net/wiki/index.php/Functions
You'll want to look through the general and challenge functions in order to find one that suites your needs.
After you isolate each letter you'll need to write some more code to reverse them.
After you have that done you can submit your answer using the setOutputString(string output); function, which takes a string as an argument and doesn't return anything.
I hope this helps you some. If you still can't figure it out just contact me next time I'm online and I'll help you out some more.
-----------------------------------------
Give a man a fish and he eats for a day. Teach him how to fish and you get rid of him all weekend.
Similar to C
Hi 1337HAX0R,
Welcome, and thanks for playing HackWars! I think that you'll find playing HackWars will help you learn to program, if you're willing to put in the time. HackScript (the in-game programming language) is very similar to the programming language C. At the moment we don't have really indepth programming tutorials, because we didn't want to reinvent the wheel (given the time it would take). There are already so many good programming tutorials available on the internet (also for C), that we usually encourage new programmers to start with a C tutorial, and then move on from there.
That being said, we will be constantly improving the HWiki over time, and hopefully it will include more walk-through tutorials for HackScript in time.
Also, people in the game are usually very willing to help if you have any trouble. You'll find the community really engaging and helpful.
Thanks for you input, and good luck.
This is bullshit i cant even
This is bullshit i cant even do the first challenge due to lack of explaining and the people in game aren't helpful at all (some guy even gave me shit about my name instead of helping me) i really think this game would be awesome if only it explained the code a little better. i use VB not C so i dont know this code very well
This does not use C. In fact
This does not use C. In fact it HW runs with Java. But the ingame script language resembles C. (C++ is about classes and some other stuff- which is another topic)
But no matter if you learned C, Pascal or Basic it should be easy to learn the basics of the other ones. And HackScript is very basic script language.
By the way I got the impression that you asked for a solution - and I refuse to give solutions because that way nobody would learn anything.
Another hint: look http://www.hackwars.net/wiki/index.php/Category:Challenges. Keep in mind that those challenges are not part of the game anymore but they are probably helpful.
Hope this helps a little
SP,
Sorry that the people in game weren't helpful, but we get the same questions a lot and sometimes it gets annoying answering them over and over. Since you weren't very specific about what problem you were having I'll try to give you some general knowledge about how the challenge works, bear with me if you already know this. I'm also going to avoid just posting the answer or anything to major (hopefully) since this would defeat the purpose of the challenge.
In order to complete this challenge you need to know a little bit about arrays and how to go through an array when you don't know the initial size.
When you run a challenge script it will be passed a string. In order to access this string in your code you would use the getInputString() function, which takes no arguments and returns a string. You can store that string in a variable and manipulate it however you want.
Once you have this string you'll need a way to isolate the different letters in the string. Go to this link: http://www.hackwars.net/wiki/index.php/Functions
You'll want to look through the general and challenge functions in order to find one that suites your needs.
After you isolate each letter you'll need to write some more code to reverse them.
After you have that done you can submit your answer using the setOutputString(string output); function, which takes a string as an argument and doesn't return anything.
I hope this helps you some. If you still can't figure it out just contact me next time I'm online and I'll help you out some more.
-----------------------------------------
Give a man a fish and he eats for a day. Teach him how to fish and you get rid of him all weekend.