Code: [Select]
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "buy" )
{
if ( ( player.Pos == sphere.Pos ) && ( sphere.ID == 0 ) )
{
Message( "Success!" );
}
else Message( "Error! Not on sphere!" );
}
return 1;
}
Wherever I use the command, it gives me an "getVarInfo: Could not retrieve UserData" error in this line: Code: [Select]
if ( ( player.Pos == sphere.Pos ) && (sphere.ID == 0 ) )
If anyone could help, it would be greatly appreciated.