Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hello I'm new to C# and SQL server and I've been creating a simple game for the last 3 weeks. So far so good but now I'm having trouble finding a way to store the result of a calculation in row 0.

Example: the player starts off with 10 units and the enemy has 6 units, the player attacks the enemy with 7 units leaving him with one unit left. Now in total he has 4 units. How do I store this result and future results in row 0.

share|improve this question
2  
What is row 0? Are you referring to a database table's row? If so does the column not matter? It sounds like you have a table which only has 1 column and you want to update the value of the row in that column with "number of units left"? We then need to know if you're using EF or doing it via System.Data namespace, what version of .NET you are using etc. Is your question about updating a database? – Dave Rook Oct 16 '12 at 9:42
Please add more details to your question, as inquired by @DaveRook, then ask it on Stack Overflow. We do not deal with programming problems here on Super User, sorry, and as it stands, we lack information. – slhck Oct 16 '12 at 10:06
@MK it will probably be migrated. Mark, don't repost on stack overflow as asking the same question twice is not OK here, just wait, it will be migrated for you; Stackoverflow is a forum for developers and I'm sure you'll get lots of helpful answers :) – Dave Rook Oct 16 '12 at 10:06
@DaveRook Well, I'd rather not migrate the question if things aren't clear, so once Mark has the details, I'd just encourage him to post the question himself again :) – slhck Oct 16 '12 at 10:08
@Mark - since this has been closed there is nothing wrong with me 'sending you away', please re-post on stackoverflow but please consider making your question clearer as it appears to just be about how to write to a database more than anything else. Slhck, noted! :) – Dave Rook Oct 16 '12 at 10:12

closed as off topic by Dave Rook, Indrek, slhck Oct 16 '12 at 10:06

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.