World two error help

Started by Shovon^, Oct 02, 2016, 10:34 AM

Previous topic - Next topic

Shovon^

I created this cmd but now when I write the cmd it shows  Member variable not found any help??
else if (cmd == "changeworld")
{
player.world=2;
MessagePlayer("world changed!", player);
}
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

jWeb


EK.IceFlake


Anik

Squirrel is a case sensitive programming language. And its player.World So player.world wont work.
replace
player.world=2;With
player.World=2;

KAKAN

What do you understand by "Member variable"? It means the variable you used with player instance. And, "not found" means it doesn't exists. So, "Member variable not found" means player.TheVariableYouUsed doesn't exist. Hence, in this context, player.world doesn't exist.
oh no

jWeb

Were the last 3 posts really needed? Do you people here battle for the post-count or something?

KAKAN

Quote from: jWeb on Oct 02, 2016, 12:39 PMWere the last 3 posts really needed? Do you people here battle for the post-count or something?
Quote from: jWeb on Oct 02, 2016, 10:47 AMW
Tell me, what would you understand by this?
For ex: "Hello, why is this not working: player.world=2;" reply: "W", new code: "player.worldw=2;" or something similar. Really, trust me, people are like that here, they won't understand your one-letter solution :)
oh no

jWeb

It's an UPPERCASE W. There's only one W in his code. If you need more than that then you're not suited to be anywhere near a line of code.

Shovon^

I used W uppercased and Also lowercased but still the same thing....
Iam the best and i only believe in Allah

Conatact me here on IRC:  #shovon^ @LUnet

jWeb

Quote from: Shovon^ on Oct 02, 2016, 03:22 PMI used W uppercased and Also lowercased but still the same thing....

In that case 'player' is not what you think it is.
    typeof