I mean I understand 'this.' is for the npc's or as you say object's script. like this.number...
Which keeps everything in the npc.. so nothing outside can 'control' it.. possibly a class or something.. "slightly unsure what could change it but I get its for that npc"
but sticking this. on a function sounds absurd o.o;
I mean, you can't create a function this.dostuff(){} can you?
Quote:
Originally Posted by WhiteDragon
It's best to throw away this idea rather than try to patch it up to something correct. It's somewhat close, but far away enough that'd it be faster to ignore it.
|
As for returning a number, I will forget it now that I know you can do
this.number = function();
where the return is in the function...
I don't quite know where I got return ??? only passes it to the statement calling it lol..
I'm learning a lot today.. Thor taught ... tried to teach me indexing, but he logged off before I could get the history.. xD
I'm almost done finishing two threads on the learning site. I'd like to do variables, arrays, prefixes, and symbol type things in part B.. Mind if I post both here and see what you guys think soon?
I'd like it to be like go through a series of example type things, and hopefully others would learn from them...
Why does this work?
PHP Code:
function onWeaponFired(){
newFunction();
player.chat = var2;
}
function newFunction(){
temp.var2 = 4;
return var2;
}
I thought this was doing exactly what temp.count was not doing? D:
The more I try to figure it out, the more everything I was just told seems to not be what I thought..