| 07-09-2004, 08:07 PM | #1 |
i have just a little problem, im working on a minigame where you have to type the answer of a mathe question(example: question is 2x3=, so the answer is 6) every player have a unit, i want it so if the player type the wrong answer his unit become vulnerable, if its correct nothing happens. i run in trouble couse i cant use integer variables in chat strings :\ |
| 07-09-2004, 08:44 PM | #2 |
use convert to integer to string but for what your doing, unless the numbers have to do with some aspect of the game, i would make 2 string arrays. one with all the question and one with all of the answers respectivly. then just check if thier chat string = the answer string to the question |
| 07-09-2004, 08:54 PM | #3 | |
Quote:
that doesnt work!(check attachment) i cant use string variables, there are too many questions and answers. i use random +,-, or x on the questions whit random number between 2 and(maxinteger) while maxinteger increase by 1 every round, a question could be (random number between 2 and(maxinteger)[ + or - or x](random number between 2 and(maxinteger) |
| 07-10-2004, 12:43 AM | #4 |
well, i figured out by myself, needed to convert the result from integer to a string variable that i could use for an if then else condition :> minigame nr 18 done so :p |
| 07-10-2004, 01:02 AM | #5 |
well when you get the answer after the whole random thing you can set that to a variable. and onyour screen, that shows that you dont have any integer vars because you can use integers in strings. and just curious.. but are you gonna have division also? edit: nm posted at same time |
