Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Shovon^ on Oct 02, 2016, 10:34 AM

Title: World two error help
Post by: Shovon^ on Oct 02, 2016, 10:34 AM
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);
}
Title: Re: World two error help
Post by: jWeb on Oct 02, 2016, 10:47 AM
W
Title: Re: World two error help
Post by: EK.IceFlake on Oct 02, 2016, 11:12 AM
Make the 'w' uppercase.
Title: Re: World two error help
Post by: Anik on Oct 02, 2016, 11:42 AM
Squirrel is a case sensitive programming language. And its player.World So player.world wont work.
replace
player.world=2;With
player.World=2;
Title: Re: World two error help
Post by: KAKAN on Oct 02, 2016, 12:24 PM
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.
Title: Re: World two error help
Post by: jWeb on Oct 02, 2016, 12:39 PM
Were the last 3 posts really needed? Do you people here battle for the post-count or something?
Title: Re: World two error help
Post by: KAKAN on Oct 02, 2016, 01:11 PM
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 :)
Title: Re: World two error help
Post by: jWeb on Oct 02, 2016, 01:42 PM
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.
Title: Re: World two error help
Post by: Shovon^ on Oct 02, 2016, 03:22 PM
I used W uppercased and Also lowercased but still the same thing....
Title: Re: World two error help
Post by: jWeb on Oct 02, 2016, 04:02 PM
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