ID:143288
 
SO I've got it working so when I use psionic blast() it only executes an attack when I get the answer right (using it to study microbio and physio heh) but I can't get it to execute a seperate proc when I get a wrong answer trying to get a penalty proc to go off when I'm wrong.




proc
ParseQuestion(Target,QuestionContent)
var/list/Answers = question_list1[QuestionContent][1]
if(!Answers) return FALSE
//HERE WHATEVER I PUT GOES OFF EVERYTIME INSTEAD OF JUST WHEN FALSE
var/CorrectAnswer = question_list1[QuestionContent][2]
if(!CorrectAnswer) return FALSE
//SAME HERE
var/GivenAnswer = input(Target,QuestionContent) in Answers
return (GivenAnswer == CorrectAnswer)

mob/verb/Psiblast1(mob/M as mob in oview(1))

var/Psiblast = pick(question_list1)
var/Answer = ParseQuestion(usr,Psiblast)
if(Answer == TRUE)
src:attack1(M)

else
//IF I PUT ANYTHING ELSE HERE I GET AN INDENT ERROR
src << "False."

mob/proc
Feedback(mob/M as mob in oview(1))
src:HP -= rand(1,10*psionic)
src:DeathCheck()


Problem description:

Why are you using : ....
It works?
In response to Kichimichi
I could use . instead I suppose might be more correct, but I wouldn't have the vaguest clue why lol, if you wanted to explain the difference in a way a newbie can understand I'd be receptive to the informativity.
In response to Kichimichi
Open up dream maker and press F1, then look up the definitions and functions of the . operator and the : operator.
In response to Pyro_dragons
Well that clears things up... kinda, would be especially useful if I knew what a prototyped object was lol.
In response to Kichimichi
Sorry to be blunt, but you shouldn't touch procs if you don't know basics like that. Start from the start, read beginner resources.
In response to Kaioken
I seem to be getting on just fine, my game's coming along quite nicely. Btw the 'go read more' advice, not so original, helpful or welcome. I'll get on as fast as I can and I have been reading extensively on the website, if I can get on a little faster from a decent tip or two great, if I only get flak heck with it I've gotten through most of my life solo as it is.

Mike
In response to Kichimichi
If you've been 'reading extensively', then surely you should know what prototyped object is, hence my previous post. Though
you can probably figure it out by just reading both entries about the . and : operators.
At any case, there's no need to get all defensive, you don't need to prove anything to anyone, more so not the way you're attempting to. Though you don't need to jump on people trying to help you either.